This section covers common issues you may encounter when using CGI scripts.
Read Your CGI Error Log
- To access the CGI Error Log, go to Hosting Summary at the top.
- Click on Scripting Config on the left pane.
- Then, look for the Server Side Includes & CGI tile and click on the Manager Server Side Includes & CGI link.
- Next, click View Error Log under Actions.
When reading a CGI error log, the first thing to remember is that errors are appended to the end of the error log. You'll need to scroll down to the bottom of the log to see the latest entry.
Note: Error log entries are limited to approximately 500 characters. This limit is rarely hit, but if you find that one of your longer errors appears to be truncated, this may be the reason.
When your CGI application records an error in your log, a few pieces of information are recorded along with it. Following is an example that has been broken down into further detail:
Sample error:
20120622T165202: <host name>/file.php Parse error: syntax error, unexpected $end in /path/to/file.php on line 33
The first part of the log entry is the date and time that the error occurred (always shown in Eastern Time):
- 20120622T165202 = June 22, 2012 at 4:52:02 PM
- Year: 2012
- Month: 06
- Day: 22
- Time: 16:52:02 PM
The second part of the log entry is the URL to the file that generated the error:
The final part of the entry is the error itself:
- Parse error: syntax error, unexpected $end in /path/to/file.php on line 33
If you're not sure what a particular error means, you may be able to search online to find more information about the error. When you search online, you may need to remove the information that's specific to your site (such as your domain or the server path) to find useful results.
My script worked fine yesterday, but now it says it can't find the path to my files. What happened?
As part of our ongoing system maintenance, we sometimes add new devices to help improve the performance of customer websites. As a result of the new hardware, customer CGI scripts (Perl, PHP) and databases that use 'real' directory paths may cease to work.
If you are using real directory paths (paths that start with '/hermes/webxx/'), you need to replace them with the correct symbolic paths ('/home/users/web/'), which are fully compatible with our shared hosting architecture.
Note: If you have any questions or need assistance updating your paths, please contact us, and we will assist you.
Why is my script returning a Server 500 error?
Explore the following possibilities to troubleshoot:
- Does your account include CGI accessibility?
- Did you call your script with the correct URL?
- Did you upload it to the correct directory?
- Does your script expect values? If so, did you use the right method (POST/GET)?
- If you edited path variables in the script, are they correct?
- Are you sure you uploaded the script in ASCII mode? You will have to upload them in ASCII mode to make them work.
- It's possible that the .htaccess coding (if coded improperly) could be causing the 500 error.