PDA

View Full Version : Internal server error - cgi script


Hans
7th February 2007, 13:19
One of my clients wants to use a cgi script.
It does not work as it should; the result is an internal server error 500.

The cgi-script is within the cgi-bin directory of the webspace and I changed the permissions of that file with the command chmod 755 <filename>.cgi.

Within ISPConfig Suexec is turned off.
Within ISPConfig, i enabled CGI and standard CGi for the clients web.

What can I do else? Do I miss something?

Hans
7th February 2007, 22:26
Within the web's logfile i found two errors with:

Exec format error: exec of 'filename.cgi'
Premature end of script headers: filename.cgi

:(

Hans
8th February 2007, 01:19
I have checked the syntax of the cgi file with the Perl command:
perl -c filename.cgi

And i dicovered syntax errors due an FTP upload by my client.
(The uploaded cgi-file was not performed in ASCII mode).

After correcting the syntax errors, everything is working fine again!

Happy me :)