Server Error: opac-main.pl, path problem
I tried to install koha-2.0.1. After installtion, the home page cgi-bin/koha/opac-main.pl, in browser gave following error.
The server encountered an internal error and was unable to complete your request. Error message: Premature end of script headers: opac-main.pl
On manual running it gave following error:
[root@glide cgi-bin]# ./opac-main.pl Can't locate C4/Auth.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at ./opac-main.pl line 7. BEGIN failed--compilation aborted at ./opac-main.pl line 7. [root@glide cgi-bin]#
If I include path like perl -I /usr/local/koha/intranet/modules/ opac-main.pl , then it executed fine. On using: export PERL5LIB="/usr/local/koha/intranet/modules" it runs fine, when used as ./opac-main.pl and [root@glide cgi-bin]# export shows following: declare -x PERL5LIB="/usr/local/koha/intranet/modules" But through browser, it gave same error of "Premature end of script headers: opac-main.pl". What will be solution? -- H.S.Rai
Hi, On Thu, 2004-10-28 at 12:26 +0530, Library wrote: <snipped>
[root@glide cgi-bin]# export
shows following:
declare -x PERL5LIB="/usr/local/koha/intranet/modules"
But through browser, it gave same error of "Premature end of script headers: opac-main.pl".
But of course! the PERL5LIB environment variable you set is effective only for that particular shell. So naturally when u run the script from the commandline of that shell it can locate Auth.pm However, that environment variable isn't shared by your webserver. I use Name-based Virtual Hosting ability of Apache and in my case, the soln is simple I use ->
SetEnv PERL5LIB "/var/www/koha/intranet/modules"
in each of the virtual host definition sections. Since I don't know how you are setting it up so YMMV cheers, -indra. -- ------------------------------------------------------------- Indranil Das Gupta, Project Lead, CASTLE Project [Computer Aided Studies, Teaching and Learning Environment] In collaboration with: West Bengal University of Technology Calcutta, INDIA www.wbut.net ------------------------------------------------------------- L2C2.ORG - Bringing Localized Low-Cost Computing to People -------------------------------------------------------------
On 2004-10-28 07:56:48 +0100 Library <lib@gndec.ac.in> wrote:
But through browser, it gave same error of "Premature end of script headers: opac-main.pl".
What will be solution?
I don't know. What are the relevant lines of your web server's error.log file? Possibly in /usr/local/koha/log -- MJR/slef My Opinion Only and not of any group I know Creative copyleft computing - http://www.ttllp.co.uk/ Will HLF fund tree-killings? http://www.thewalks.co.uk/
participants (3)
-
Indranil Das Gupta -
Library -
MJ Ray