How to Fix Internal Server Error for cgi script.

Internal Server Error for cgi script means that the cgi script did not execute properly.

1) check the /var/log/httpd/suexec_log. It contains any errors that would be as a result of not having correct permissions on the file.

2)The file needs to be in a cgi-bin and must have the owner/group as the username who owns the site.

3)The most common chmod permission is 755, the script must have execute permission.

4)The easiest way to figure out script coding problems is to first run the script manually from an ssh prompt.

./script.cgi

5)Other errors that would be generated when running the script manually from ssh would be missing perl modules.

6)Cpan is the easiest method to install new perl modules.

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.