Results 1 to 15 of 15

Thread: Desperately lost and confused. (Super noobish question)

  1. #1
    Registered
    Join Date
    Feb 2006
    Location
    Maryland
    Posts
    16
    Rep Power
    0

    Desperately lost and confused. (Super noobish question)

    I've uploaded a .pl file to my server, and wish to run it. Running this same file from my PC won't let me access my SQL database. What is the best method of running this .pl file server side?

  2. #2
    YvetteKuhns's Avatar
    Join Date
    Feb 2003
    Location
    Allentown, PA USA
    Posts
    15,244
    Rep Power
    34
    Did you upload your Perl file in ASCII mode?
    Is the first line of your script correct for the CGI script to run?
    Are you trying to connect to a MySQL database that is correctly created on PowWeb?

    Is CGI enabled on your server? You can run a simple test script to be sure.
    Yvette Kuhns
    Power Pages Web Design
    Customized Internet Advertising Solutions

  3. #3
    Registered
    Join Date
    Feb 2006
    Location
    Maryland
    Posts
    16
    Rep Power
    0
    As you could probably guess I'm no scripter. This file is pre-written by a group and used for building a database from log files to keep statistics for a game I play. As for ascii mode, I'm not sure, it looks like it's just written in code and I uploaded it using an ftp program directly to my webspace. The MySQL database is set up properly and hosted on my powweb space. I'm upset to find out that I can't access my DB from my home PC or else I would be much less confused.

    Is there an option to turn on cgi? I've used forum apps and such before, which I'm assuming would require the cgi to be enabled.

    Thanks for the reply!

    Obsquacious

  4. #4
    YvetteKuhns's Avatar
    Join Date
    Feb 2003
    Location
    Allentown, PA USA
    Posts
    15,244
    Rep Power
    34
    What FTP program are you using to upload the file? You should be able to choose ASCII mode or Auto if PL files are known to be uploaded in ASCII mode.

    Open your PL script in Notepad and see if the first line looks like this:
    #!/usr/bin/perl

    If it doesn't have the correct path, change it to this path. You must edit the file in a plain text editor or you will corrupt the file.

    Years ago CGI was enabled by default on new web host accounts. Some newer accounts discovered that CGI was not enabled and no CGI, PHP or PL scripts would work.

    A simple way to see if your CGI works is to create a file named test.php in Notepad. Include the following line and upload to your server.

    PHP Code:
    <?php phpinfo(); ?>
    PHP requires CGI to be enabled, so you should be able to see a list of info if the script runs.
    Yvette Kuhns
    Power Pages Web Design
    Customized Internet Advertising Solutions

  5. #5
    Registered
    Join Date
    Feb 2006
    Location
    Maryland
    Posts
    16
    Rep Power
    0
    I'm using filezilla, and after a quick check it defaults to uploading .pl as ASCII.

    My script does begin with that line, and I'm certain CGI is enabled. This will probably be my last update to this thread till Friday or so. Will directing the server to the .pl file as a scheduled job be sufficient for running it? It's not a constantly run file, it just tells the database to look at my log files and update itself then closes I believe.


    Thanks very much again,

    Obsquacious.

  6. #6
    Rick
    Join Date
    May 2002
    Location
    Minneapolis, MN
    Posts
    1,753
    Rep Power
    19
    The best way to run the script is to access it through your browser so that you have a chance to see any error messages it might be displaying. Just enter:

    http://www.example.com/cgi-bin/yourfile.pl

    or whatever the path is to the file in your filespace. You also need to be sure to set the permissions on the Perl script file to 755 for it to be executable. You can do this through your FTP program or through the File Manager in OPS. Good luck!
    Rick Trethewey

  7. #7
    Custom User Title entrecon's Avatar
    Join Date
    Aug 2006
    Location
    Michigan
    Posts
    2,742
    Rep Power
    17
    If it is trying to create the database, as far as I know you can not do that from any script on PowWeb. You can add tables and create entries, but you can not create the actual database, you have to do that manually through OPs.
    ________________________________
    Find me on twitter: @entrecon

  8. #8
    YvetteKuhns's Avatar
    Join Date
    Feb 2003
    Location
    Allentown, PA USA
    Posts
    15,244
    Rep Power
    34
    entrecon:
    The MySQL database is set up properly and hosted on my powweb space.
    I asked that question earlier.
    Yvette Kuhns
    Power Pages Web Design
    Customized Internet Advertising Solutions

  9. #9
    Former Spam Filter (EU) IanS's Avatar
    Join Date
    Mar 2004
    Location
    Washington (THE original UK one!)
    Posts
    12,964
    Rep Power
    30
    The issue could be connected with this:
    MySql work
    This is a Powweb customer
    helping Powweb customer forum.

    I am a customer just like you!!

    Some matters can only be answered by staff or support.
    Give it a go - ask here first!

  10. #10
    YvetteKuhns's Avatar
    Join Date
    Feb 2003
    Location
    Allentown, PA USA
    Posts
    15,244
    Rep Power
    34
    Yeah, that is why a simple script could be tested to eliminate CGI problems as the cause.
    Yvette Kuhns
    Power Pages Web Design
    Customized Internet Advertising Solutions

  11. #11
    Registered
    Join Date
    Feb 2006
    Location
    Maryland
    Posts
    16
    Rep Power
    0
    Quote Originally Posted by YvetteKuhns View Post
    Yeah, that is why a simple script could be tested to eliminate CGI problems as the cause.
    I just tried out that little script and it worked fine. To the other person who replied, I had to manually set the database up, and give the install program for this app the username/password for the database and it goes in and just formats it. I've got a thread on the support form of the program's homepage also.

    Thanks again for all your replies.

  12. #12
    YvetteKuhns's Avatar
    Join Date
    Feb 2003
    Location
    Allentown, PA USA
    Posts
    15,244
    Rep Power
    34
    I've got a thread on the support form of the program's homepage also.
    That is probably the best idea but the problem may still be the recent MySQL issues with the web host. Good luck!
    Yvette Kuhns
    Power Pages Web Design
    Customized Internet Advertising Solutions

  13. #13
    Custom User Title entrecon's Avatar
    Join Date
    Aug 2006
    Location
    Michigan
    Posts
    2,742
    Rep Power
    17
    You gave the app the username/password, but did you give it the host name or database name too? Often scripts use "localhost" but on powweb it is username.powwebmysql.com .

    Have you read this thread: http://forums.powweb.com/showthread.php?t=77669 ?
    ________________________________
    Find me on twitter: @entrecon

  14. #14
    Registered
    Join Date
    Feb 2006
    Location
    Maryland
    Posts
    16
    Rep Power
    0
    Quote Originally Posted by entrecon View Post
    You gave the app the username/password, but did you give it the host name or database name too? Often scripts use "localhost" but on powweb it is username.powwebmysql.com .

    Have you read this thread: http://forums.powweb.com/showthread.php?t=77669 ?
    Yessir. The app comes with a .cfg file with that looks like:


    # stats.cfg should ONLY contain basic database settings.
    # any other configuration settings will be ignored.


    dbtype = mysql

    dbhost = *********.powwebmysql.com
    dbport =
    dbname = psychostats3_1

    dbuser = ps3

    dbpass = ****
    dbtblprefix = ps_

    dbcompress = 0



    So it looks for a MySQL database on other servers if it's told to. I wish I could just run it from my home PC (I had actually installed perl on my PC before I read that thread that you posted up above).

    I'm wondering if there's just some conflict between powweb and this program that is above my head that could keep it from working.


    As usual,

    Thank ya for your help.

  15. #15
    Custom User Title entrecon's Avatar
    Join Date
    Aug 2006
    Location
    Michigan
    Posts
    2,742
    Rep Power
    17
    possible...what about looking at log files? (I am sure you have done all of this, grasping at straws here)
    ________________________________
    Find me on twitter: @entrecon

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •