LexiConn Knowledgebase

Knowledgebase Home | Favorites Knowledgebase Home | Favorites
Search the Knowledgebase Browse by Category
After I edit my CGI script, it no longer functions.
Article Details

Last Updated
19th of September, 2008

User Opinions (117 votes)
90% thumbs up 9% thumbs down

How would you rate this answer?
Not helpful

Perl CGI scripts must be uploaded to your account via FTP as ASCII files to run properly. Also, all CGI scripts must be executable. This requires setting the permissions on the file using your FTP program and making sure the script is world executable (chmod +x filename).

If you are getting an "Internal Server Error" and you have verified the CGI script was uploaded as an ASCII file and it is executable, there may be a syntax error in the code. The easiest way to determine this is to SSH into your account, go to the directory that contains the script (cd www/directory), and run the program from the prompt by typing in the name of the script. This will show the error in the program.

Checking the error-log file in your home directory will also give errors that occurred during the use of CGI scripts on your web site.

You also have the ability to check the syntax of a Perl script via the Fileman utility in your Account Manager. To get to fileman, log in to your account manager and click the "Site Tools" tab on the left hand menu. Next, click the "Fileman" link. This will open up a new window with the Fileman utility which will display your account's home directory.

Here is a brief step-by-step of how to use its Perl syntax checker:

1. Use the File / Directory structure to locate the Perl script you wish to check.

2. Once you have found the script, check the box next to it.

3. Click the Perl link in the "Commands" menu at the bottom.

4. Underneath the "Commands" menu, you will see a text input box next to the word "Command:". Use this box to pass the script any additional commands which may be required (this is optional).

5. Click the button that says "Perl" and Fileman will begin processing the script.

6. From here you may use the messages displayed to assist you in troubleshooting. Fileman will also tell you if there are no syntax errors in your script.

Related Articles
No attachments were found.

Powered by Interspire Knowledge Manager Knowledgebase Software