My CGI/Perl scripts are failing with error 500 (Internal Server Error)

These errors are nearly always related to a coding error within the script, or bad variables being passed into the script. If you encounter an error "500 Internal Server Error" whilst running your CGI and Perl scripts, try the following in order:

- Ensure you have uploaded the script through FTP using ASCII mode (not Binary), or that it has Unix-style carriage returns.

- Check the interpreter path on the first line of the script. For Perl it should
always be "#!/usr/bin/perl".

- Make sure the script filename ends in either ".pl" or ".cgi".

- Make sure the script can execute. It should have permissions of "755". Most FTP clients support this.

- Put "use CGI::Carp qw(fatalsToBrowser);" into the second line of your
script. This will make Perl print the error instead of the "500 Internal Server Error" page, and will allow you to find out where your script is breaking.

If these steps do not help, then it is a good idea to check the error logs on your site, available through the Chips Internet panel. The error logs will often show a lot more information regarding internal server errors, and in many cases will reference the script causing the issue, and which line the issue is on so that you can locate it easily. 

  • Email, SSL
  • 0 משתמשים שמצאו מאמר זה מועיל
?האם התשובה שקיבלתם הייתה מועילה

Related Articles

When I try and view my website I get an HTTP Error 403 - Forbidden message.

A '403 Forbidden' message means that the browser has requested a page that it is not permitted to...

When I try and view my website I get an HTTP Error 403 - Forbidden message.

A '403 Forbidden' message means that the browser has requested a page that it is not permitted to...

My links are not working. What is wrong?

First of all, check that the link is correctly spelled, and that the correct case is used -...

My links are not working. What is wrong?

First of all, check that the link is correctly spelled, and that the correct case is used -...

I've put up my site but I still see the standard index page. What's up?

When we create a hosting package, we place a simple index.html holding page into the public_html...

Powered by WHMCompleteSolution