Tiger Technologies Technical Support

Why does my script display an "internal server error" message?

The most common reason for an Internal Server Error message is that you've uploaded a script in the wrong "mode" in your FTP program. In particular, Perl, Ruby and Python scripts should always be uploaded in "ASCII" or "text" mode, not "binary" mode.

Our CGI Script Checker will tell you if a script has been uploaded in the wrong mode. If that's the problem, see the documentation that comes with your FTP program to learn how to change the mode, then re-upload your script.

(The Script Checker can also catch other common problems, such as the first line of the script having the wrong "path". Always try the Script Checker first if you have trouble.)

Getting more information for Perl or Python scripts

If the Script Checker says the script is okay, there is probably a bug or "typo" in the CGI script you have uploaded. If the script is a Perl or Python script, you can modify the script slightly so that your Web browser shows you the actual error.

For detailed instructions, see the sections of our Perl page and Python page that discuss internal server errors. We also have extra tips on debugging Perl scripts.

Other causes of internal server errors

Another common cause of "internal server error" messages is creating a .htaccess file that contains syntax errors or unsupported commands such as "php_value". If you've created a .htaccess file, try removing it to see if that solves the problem.

If that doesn't help, the file may have incorrect "line endings". It's possible to convert the line endings to fix this.

Search


Related Topics

Script Checker

Perl Scripts

Ruby and Rails

Python Scripts

PHP Scripts

Apache .htaccess Files

Using php_flag or php_value in .htaccess files

Converting Line Feeds

Debugging Perl Scripts