The stupid question is the question not asked | |
PerlMonks |
Apache/CGI error: "Premature end of script headers"by Callum (Chaplain) |
on May 18, 2004 at 10:42 UTC ( [id://354216]=perlquestion: print w/replies, xml ) | Need Help?? |
Callum has asked for the wisdom of the Perl Monks concerning the following question:
This may be OT, as I've got a nagging feeling it's going to end up being an apache problem, if so my appologies.
We moved one of our small websites to a new server a week or so ago, everything seemed hunky-dory at the time, I go away for a week and come back to find that "nothing's changed but none of our CGI scripts work any more" *sigh*. What we're getting is that loveliest of apache error messages "premature end of script headers" for our perl CGI scripts, I'm running out of things to try, and I'm pretty sure I've covered everything that searching PM turned up that was relevant. What we have is this: A trivial test cgi script:
which, when called through a browser, errors, leaving the following in the logs: Error handling is done via bourne shell cgi scripts (in order to produce more user friendly error messages, etc), which work fine: Is giving the "500:Server configuration error, whinge to Callum" message that I'd expect it to, and changing the name of the person to complain to dosn't appear to fix the problem :) The test script works fine on the command line of the webserver:
The http error code 403 Forbidden usually means a permissions problem, but I don't believe that's the case here: the permissions on /WWW/bin/perl are 555, the permissions on test.cgi are 755, everyone has read and execute permissions (ie, ugo+rx) to all directories up to and including cgi_test/ The webserver and the workstation where I'm editing stuff and running the browser are both Unix boxes, and the editing's being done in vi -- so no CRLFs or such nonsense. The script is being recognised as CGI, in particular the webserver is returning an error code 500, but it dosn't appear to execute it -- change the script so the first thing it does is touch a file in /tmp, works fine on the command line, no result through the browser other than the same errors. There is a handler set up for cgi scripts: And as mentioned earlier the bourne shell error handling scripts are working fine. I think I've included everything I've looked at -- does anyone have any suggestions as to what might be going wrong?
Back to
Seekers of Perl Wisdom
|
|