Why am I Getting an Internal Server Error?

Article No. 95
Created: 05:58 AM 12.19.03
Author: HPU Support [Link: support@homepageuniverse.com]
Original URL: https://my.homepageuniverse.com/support/knowledgebase/question.php?qstId=95


"Internal Server Error. The server encountered an internal error or misconfiguration..."

This is almost ALWAYS due to bad code. Not bad like malicious, bad like poorly written. Make sure that any modules they are using are installed on our servers. Also, make sure they realize we are running Linux servers. If they have libraries like use Win32::Winsock or something, then internal errors will abound.

Make sure that anything they are using that specifies server information like an IP or hostname is correct.
If the script is a Perl script, ensure that it has the correct permissions.  Usually 755.

After that, one has to crawl into the PERL code to see where error lies. Make sure they have a -w after #!/usr/bin/perl and try to run the code and hope for helpful error messages.

One common problem also related to file permissions is they'll have a cgi script
that is writing to a file somewhere and the permissions on the cgi script are correct but
the file does not have the proper write permissions. The script will execute as the user
and so the permissions on a file to be written to should also be 775 or 770 if they only
want to use the file internally.

Back to original article