Active Web Hosting Logo
FAQ Index Getting Started Your Account Domains Web Site & Hosting E-Mail
FTP CGI PHP Scripting MySQL Database Script Installation Legal Information

Error 500: 'Internal Server Error' When Running CGI or Perl Scripts

If you receive an "Internal Server Error" when you run a CGI script, there are a couple things you should check:

  • Be sure you have set the file permissions to 755 so that the script is executable. You can do this through your FTP program after you upload your script.

  • If the script you are trying to execute was written with a Windows text editor, it probably has an unrecognizable end-of-line sequence. You will need to resave the script in "Unix format".

    Windows users can do this using a program called EditPlus. Simply go into the Document menu and choose File Format (CR/LF). Select Unix and then resave the document.

    Linux users with KDE can do this with Kate. Go into the Tools menu and choose End of Line. From there choose Unix and resave the document.

    There are other text editors that can also save in Unix format. Be sure to check your favorite editor's documentation to see if this is supported or find one that saves to Unix format. Do not use word processors for creating or editing CGI scripts.

  • Be sure you have your script interpreter referenced correctly. For perl, this should be:

    #!/usr/bin/perl

    Be sure there are no spaces in this line and that it is on a separate line.

  • Check for syntax and other errors in your script. Most lines in perl scripts should end with a semi-colon (;) unless it's a test or loop. Comments all have a hash (#) as the first character of every line.

  • If you did not write the script yourself, you may want to try contacting the author of the script for further support, or try another script.



Home - Support - Management - About Us
... Active Web Hosting, 213 N Stephanie St G318, Henderson, NV 89074 ...
(702) 449-2337