Why am I getting the "Internal Server Error (500)" message?

Internal Server Error (500) errors are typically something wrong in the syntax of your script. Most often you should check to make sure you have the path to PERL correct. Currently we are running Perl5 on our servers.
The correct path to PERL is: #!/usr/bin/perl
Here are the correct paths to the common server resources that CGI scripts often require:

Perl version 5.006001: /usr/bin/perl
Absolute path for your files/scripts: /home/username/public_html/
Absolute cgi-bin path: /home/username/public_html/cgi-bin/
Sendmail: /usr/sbin/sendmail
Date: /bin/date
Java: /usr/bin/java
Whois: /usr/bin/whois
Python: Python: /usr/bin/python

Other most common resons are:

  • Wrong sysntax in your cgi script
  • Wrong file permission, chmod 777 world read, write execute is most common error. Try chmod to 755
  • Wrong File path. See correct format above.
  • Cgi Script was not uploaded in ASCII mode.

Was this answer helpful?

 Print this Article

Also Read

Do my CGI scripts need to be in my "cgi-bin" folder?

All .cgi and .pl can only be executed in cgi-bin at this time.

CGI-BIN and Perl scripts not working on my domain ?

There are lot of reasons for not working of cgi and perl scripts. You can do small test on your...

I uploaded my CGI script . How to execute that script ?

Before executing scripts you need to follow below steps to avoid any errors. 1) You need to...

What is SSI? and how do I use it ?

Server Side Includes (SSI)When using a UNIX/LINUX system it is sometimes necessary to enable...

What file permissions do I need for my CGI scripts?

CGI scripts must be set with executable file permissions, or requests for the script from the web...