From rick@praxis.com.au Fri Jul 10 01:23:01 2026 From: Rick Welykochy To: koha-devel@lists.koha-community.org Subject: [Koha-devel] Premature end of script headers Date: Fri, 14 Sep 2007 16:07:28 +1000 Message-ID: <46EA2520.8040907@praxis.com.au> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4845066022249169596==" --===============4845066022249169596== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 follow= ing 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: =3D=3D> log/opac-error_log <=3D=3D [Fri Sep 14 15:58:59 2007] [error] [client 10.11.12.8] Premature end of scrip= t 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=3D; path=3D/ Date: Fri, 14 Sep 2007 06:03:58 GMT Content-Type: text/html; charset=3DISO-8859-1 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 s= imple. 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 --=20 _________________________________ Rick Welykochy || Praxis Services Traditionally, most of Australia's imports come from overseas. -- Keppel Enderbery --===============4845066022249169596==-- From crc@liblime.com Fri Jul 10 01:23:01 2026 From: Chris Cormack To: koha-devel@lists.koha-community.org Subject: Re: [Koha-devel] Premature end of script headers Date: Fri, 14 Sep 2007 20:11:49 +1200 Message-ID: <31575EA7-87E8-45E3-8F3C-20180636384A@liblime.com> In-Reply-To: <46EA2520.8040907@praxis.com.au> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4130317454110077233==" --===============4130317454110077233== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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 --===============4130317454110077233==-- From rick@praxis.com.au Fri Jul 10 01:23:02 2026 From: Rick Welykochy To: koha-devel@lists.koha-community.org Subject: Re: [Koha-devel] Premature end of script headers Date: Fri, 14 Sep 2007 18:37:30 +1000 Message-ID: <46EA484A.6040000@praxis.com.au> In-Reply-To: <31575EA7-87E8-45E3-8F3C-20180636384A@liblime.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7853090928428604673==" --===============7853090928428604673== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Chris Cormack wrote: > Are you running apache2, if so what version, some of them don't seem to=20 > log all the errors to the virtualhost error logs but instead log them to=20 > the main apache2 error log. > So I'd take a look in /var/log/apache2/error_log (or whereever the set=20 > 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 --=20 _________________________________ Rick Welykochy || Praxis Services Traditionally, most of Australia's imports come from overseas. -- Keppel Enderbery --===============7853090928428604673==--