Internal server error - cgi script

Discussion in 'Server Operation' started by Hans, Feb 7, 2007.

Thread Status:
Not open for further replies.
  1. Hans

    Hans Moderator ISPConfig Developer

    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?
     
    Last edited: Feb 8, 2007
  2. Hans

    Hans Moderator ISPConfig Developer

    Within the web's logfile i found two errors with:

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

    :(
     
    Last edited: Feb 8, 2007
  3. Hans

    Hans Moderator ISPConfig Developer

    Problem solved!

    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 :)
     
    Last edited: Feb 8, 2007
Thread Status:
Not open for further replies.

Share This Page