I keep getting a 500 Internal Server Error. Why?

There are many different possibilities. If you have a problem, misconfiguration, or syntax error in you script, you will probably be able to find it by checking your error logs which can be found in your your control panel under "Statistics -> Show Error Logs".
 
Although this is generally caused by a problem within the script, many times it is caused by incorrect file permissions either on the script itself, or another file or directory used by the script. You should also verify the that the script paths are set correctly.
 
You should verify that the first line of your script is the path to Perl, and that it is correct. It should be set to:

/usr/bin/perl
OR
/usr/local/bin/perl
 
You should also verify that the scripts were uploaded in the correct mode (ASCII or Binary - check the readme for the scripts to see any special instructions. Normally it is ASCII).
 
Another problem could be permissions of the file or directory. Your script permissions should be 755, or rwxr-xr-x. Do Not make your CGI scripts 777 (or rwxrwxrwx). This would make them editable by other customers on the same server. In fact, if you script contains password information to connect to a mySQL database, you should make them 700 (rwx------) so no one else would even be able to read them. The same thing applies to directories where the scripts reside


  • Email, SSL
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

What is the difference between shared SSL and private SSL?

A shared SSL displays as https://ip/~yourusername/. A private SSL would display as...

Why are my FrontPage extensions not working?

You must first make sure you have installed the extensions from going into your cpanel and...

Application Paths

Here are the applications paths. If you do not see what you are looking for, please email...

Custom error pages

To create a custom error page for your account you will need to upload a file with the...

How do I use SSL to setup my email?

Set your mail server to the host name for SMTP/POP3/IMAP (instead of domain.com) and then make...