Premature end of script headers
Hi all, Directly related to our discussions about error handling, I am in a fix. I have installed a new instance of Koha/2.0.0 (don't ask!) and get the following error at the OPAC login URL, e.g. http://HOSTNAME/cgi-bin/koha/opac-main.pl 500 INTERNAL SERVER ERROR So I look in the opac error_log: ==> log/opac-error_log <== [Fri Sep 14 15:58:59 2007] [error] [client 10.11.12.8] Premature end of script headers: opac-main.pl Hrmmm .... now what? Ah yes, let's try that script from the shell: 1. set PERL5LIB as required 2. run the script: # perl opac/cgi-bin/koha/opac-main.pl Set-Cookie: sessionID=; path=/ Date: Fri, 14 Sep 2007 06:03:58 GMT Content-Type: text/html; charset=ISO-8859-1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html> etc.etc.etc. So this script runs fine in the shell but not in Apache. And in Apache, the error is so severe I see no error message. I retried after adding use CGI::Carp qw(fatalsToBrowser); to the script, to no avail. I also repeated this experiment using the about.pl, since that script is so simple. Same results: shell 1 apache 0 Anyone have any clues? I am using my knowledge of Koha/2.2.9 to guide me so perhaps Koha/2.0.0 needs a slightly different configuration in Apache?!?! cheers rickw -- _________________________________ Rick Welykochy || Praxis Services Traditionally, most of Australia's imports come from overseas. -- Keppel Enderbery
On 14/09/2007, at 6:07 PM, Rick Welykochy wrote:
Hi all,
Directly related to our discussions about error handling, I am in a fix. I have installed a new instance of Koha/2.0.0 (don't ask!) and get the following error at the OPAC login URL, e.g.
http://HOSTNAME/cgi-bin/koha/opac-main.pl
500 INTERNAL SERVER ERROR
So I look in the opac error_log:
==> log/opac-error_log <== [Fri Sep 14 15:58:59 2007] [error] [client 10.11.12.8] Premature end of script headers: opac-main.pl
Hi Rick Are you running apache2, if so what version, some of them don't seem to log all the errors to the virtualhost error logs but instead log them to the main apache2 error log. So I'd take a look in /var/log/apache2/error_log (or whereever the set up is) and see if there is more information in there. Chris -- Chris Cormack chris.cormack@liblime.com VP Research and Development www.liblime.com LibLime +64 21 542 131
Chris Cormack wrote:
Are you running apache2, if so what version, some of them don't seem to log all the errors to the virtualhost error logs but instead log them to the main apache2 error log. So I'd take a look in /var/log/apache2/error_log (or whereever the set up is) and see if there is more information in there.
Apache2 it is. And you got it in one. The /var/log/apache2/error.log shows this: [Fri Sep 14 15:48:24 2007] [error] (13)Permission denied: exec of '/usr/local/koha/opac/cgi-bin/koha/opac-main.pl' failed I had obtained all the Koha200Pre5 sources from a zipfile, which of course drops the execute perms on files. Now that I've made the *.pl files executable, all is going well. I do recall there is an Apache config to force all perl scripts to execute regardless of perms, something like "AddHandler cgi-script pl", but I think I'll leave well enough alone on the Koha/2.0.0 install. thanks, rickw -- _________________________________ Rick Welykochy || Praxis Services Traditionally, most of Australia's imports come from overseas. -- Keppel Enderbery
participants (2)
-
Chris Cormack -
Rick Welykochy