[Koha] [Koha 16.05] CGI Error: "script not found or unable to stat: /usr/lib/cgi-bin/img..."
Tomas Cohen Arazi
tomascohen at gmail.com
Sat Aug 6 04:13:08 NZST 2016
Whenever you run instance-specific commands, setting the KOHA_CONF variable
and using the root user, you might be breaking permissions somewhere. This
could be the root cause of many problems. If you need to run a script for a
specific instance (say, library2) you MUST do it like:
$ sudo koha-shell library2
library2$ /usr/share/koha/bin/cronjobs/fines.pl
I haven't been following your emails due to lack of time, but wanted to
mention this before leaving the office.
Regards
El vie., 5 ago. 2016 a las 11:59, Craig Butosi (<craig.butosi at rcmusic.ca>)
escribió:
> Hi Nombre,
>
> From the command line:
>
> $ export KOHA_CONF=/etc/koha/sites/library2/koha-conf.xml
> $ /usr/share/koha/bin/cronjobs/fines.pl
>
> throws:
>
> Can't locate C4/Context.pm in @INC (you may need to install the
> C4::Context module) (@INC contains: /etc/perl /usr/local/lib/perl/5.18.2
> /usr/local/share/perl/5.18.2 /usr/lib/perl5 /usr/share/perl5
> /usr/lib/perl/5.18 /usr/share/perl/5.18 /usr/local/lib/site_perl .) at
> /usr/share/koha/bin/cronjobs/fines.pl line 33.
> BEGIN failed--compilation aborted at /usr/share/koha/bin/cronjobs/fines.pl
> line 33.
>
> Intranet-error.log reports around the same time:
>
> [Fri Aug 05 10:51:25.492127 2016] [cgi:error] [pid 30817] [client
> 209.20.18.21:64060] script not found or unable to stat:
> /usr/lib/cgi-bin/img, referer:
> http://rel.rcmusic.ca:8080/cgi-bin/koha/members/pay.pl?borrowernumber=1
> [Fri Aug 05 10:51:25.526676 2016] [cgi:error] [pid 30823] [client
> 209.20.18.21:64149] script not found or unable to stat:
> /usr/lib/cgi-bin/img, referer:
> http://rel.rcmusic.ca:8080/cgi-bin/koha/members/pay.pl?borrowernumber=1
> [Fri Aug 05 10:51:30.909833 2016] [cgi:error] [pid 30827] [client
> 209.20.18.21:64153] script not found or unable to stat:
> /usr/lib/cgi-bin/img, referer:
> http://rel.rcmusic.ca:8080/cgi-bin/koha/members/members-home.pl
> [Fri Aug 05 10:51:34.942577 2016] [cgi:error] [pid 30867] [client
> 209.20.18.21:64234] script not found or unable to stat:
> /usr/lib/cgi-bin/img, referer:
> http://rel.rcmusic.ca:8080/cgi-bin/koha/members/member.pl
> [Fri Aug 05 10:51:40.637561 2016] [cgi:error] [pid 30873] [client
> 209.20.18.21:64281] script not found or unable to stat:
> /usr/lib/cgi-bin/img, referer:
> http://rel.rcmusic.ca:8080/cgi-bin/koha/members/moremember.pl?borrowernumber=2824
> [Fri Aug 05 10:51:40.667311 2016] [cgi:error] [pid 30883] [client
> 209.20.18.21:64408] script not found or unable to stat:
> /usr/lib/cgi-bin/img, referer:
> http://rel.rcmusic.ca:8080/cgi-bin/koha/members/moremember.pl?borrowernumber=2824
> [Fri Aug 05 10:51:45.847029 2016] [cgi:error] [pid 30887] [client
> 209.20.18.21:64409] script not found or unable to stat:
> /usr/lib/cgi-bin/img, referer:
> http://rel.rcmusic.ca:8080/cgi-bin/koha/members/pay.pl?borrowernumber=2824
> [Fri Aug 05 10:51:45.868443 2016] [cgi:error] [pid 30893] [client
> 209.20.18.21:64730] script not found or unable to stat:
> /usr/lib/cgi-bin/img, referer:
> http://rel.rcmusic.ca:8080/cgi-bin/koha/members/pay.pl?borrowernumber=2824
> [Fri Aug 05 10:51:53.275770 2016] [cgi:error] [pid 30901] [client
> 209.20.18.21:64768] script not found or unable to stat:
> /usr/lib/cgi-bin/img, referer:
> http://rel.rcmusic.ca:8080/cgi-bin/koha/circ/circulation.pl?borrowernumber=2824
> [Fri Aug 05 10:51:53.292277 2016] [cgi:error] [pid 30905] [client
> 209.20.18.21:64965] script not found or unable to stat:
> /usr/lib/cgi-bin/img, referer:
> http://rel.rcmusic.ca:8080/cgi-bin/koha/circ/circulation.pl?borrowernumber=2824
> [Fri Aug 05 10:51:53.303892 2016] [cgi:error] [pid 30907] [client
> 209.20.18.21:64966] script not found or unable to stat:
> /usr/lib/cgi-bin/img, referer:
> http://rel.rcmusic.ca:8080/cgi-bin/koha/circ/circulation.pl?borrowernumber=2824
> [Fri Aug 05 10:52:03.480931 2016] [cgi:error] [pid 30914] [client
> 209.20.18.21:64968] script not found or unable to stat:
> /usr/lib/cgi-bin/img, referer:
> http://rel.rcmusic.ca:8080/cgi-bin/koha/members/readingrec.pl?borrowernumber=2824
> [Fri Aug 05 10:52:03.516939 2016] [cgi:error] [pid 30926] [client
> 209.20.18.21:65157] script not found or unable to stat:
> /usr/lib/cgi-bin/img, referer:
> http://rel.rcmusic.ca:8080/cgi-bin/koha/members/readingrec.pl?borrowernumber=2824
>
>
> No fines calculated/posted.
>
> C
>
> Craig Butosi, MA, MLIS, B Mus (Hons.)
> LIBRARY SERVICES MANAGER
> THE ROYAL CONSERVATORY
> TELUS Centre for Performance and Learning
> 273 Bloor Street West
> Toronto, ON M5S 1W2
> 416.408.2824 x338
> www.rcmusic.ca
>
>
> -----Original Message-----
> From: Koha [mailto:koha-bounces at lists.katipo.co.nz] On Behalf Of Nombre
> Sent: August-05-16 10:46 AM
> To: koha at lists.katipo.co.nz
> Subject: Re: [Koha] [Koha 16.05] CGI Error: "script not found or unable to
> stat: /usr/lib/cgi-bin/img..."
>
> Hae you tried without export PERL5LIB?
>
> El 05/08/16 a las 16:06, Craig Butosi escribió:
> > Hi Nombre,
> >
> > Thanks for responding. Unless I am misunderstanding you, I believe I've
> already done this, as explained:
> >
> > Rather than waiting for crontab or /etc/cron.daily/koha-common to run,
> and am I going to the command line and executing manually:
> >
> > $ export KOHA_CONF=/etc/koha/sites/library2/koha-conf.xml
> > $ export PERL5LIB=/usr/share/koha/lib
> > $ /usr/share/koha/bin/cronjobs/fines.pl
> >
> > To no effect, except for the errors in intranet-error.log.
> >
> > Immediately prior to testing koah scripts, I updated to 16.05.02 with no
> reported errors, and (to my surprise) changed our server's default timezone
> via "tz-data" in order that circulation times (due daes, etc) are properly
> calculated and posted as local times.
> >
> > Latest entries in Intranet-error.log is as follows:
> >
> > [Fri Aug 05 09:46:47.780211 2016] [cgi:error] [pid 27352] [client
> > 209.20.18.21:3120] script not found or unable to stat:
> > /usr/lib/cgi-bin/img, referer:
> > http://rel.rcmusic.ca:8080/cgi-bin/koha/members/readingrec.pl?borrower
> > number=2824 [Fri Aug 05 09:46:47.793198 2016] [cgi:error] [pid 27325]
> > [client 209.20.18.21:3089] script not found or unable to stat:
> > /usr/lib/cgi-bin/img, referer:
> > http://rel.rcmusic.ca:8080/cgi-bin/koha/members/readingrec.pl?borrower
> > number=2824 [Fri Aug 05 09:46:47.818208 2016] [cgi:error] [pid 27357]
> > [client 209.20.18.21:3108] script not found or unable to stat:
> > /usr/lib/cgi-bin/img, referer:
> > http://rel.rcmusic.ca:8080/cgi-bin/koha/admin/smart-rules.pl?branch=RE
> > L [Fri Aug 05 09:46:47.847954 2016] [cgi:error] [pid 27367] [client
> > 209.20.18.21:3144] script not found or unable to stat:
> > /usr/share/koha/intranet/cgi-bin/img, referer:
> > http://rel.rcmusic.ca:8080/cgi-bin/koha/admin/smart-rules.pl?branch=$
> > [Fri Aug 05 09:48:13.108941 2016] [cgi:error] [pid 27423] [client
> > 209.20.18.21:4058] script not found or unable to stat:
> > /usr/lib/cgi-bin/img, referer:
> > http://rel.rcmusic.ca:8080/cgi-bin/koha/admin/smart-rules.pl?branch=*
> > [Fri Aug 05 09:48:13.137043 2016] [cgi:error] [pid 27427] [client
> > 209.20.18.21:4074] script not found or unable to stat:
> > /usr/share/koha/intranet/cgi-bin/img, referer:
> > http://rel.rcmusic.ca:8080/cgi-bin/koha/admin/smart-rules.pl?branch=*
> > [Fri Aug 05 09:48:20.099940 2016] [cgi:error] [pid 27433] [client
> > 209.20.18.21:4103] script not found or unable to stat:
> > /usr/lib/cgi-bin/img, referer:
> > http://rel.rcmusic.ca:8080/cgi-bin/koha/admin/smart-rules.pl?branch=RE
> > L [Fri Aug 05 09:48:20.127859 2016] [cgi:error] [pid 27439] [client
> > 209.20.18.21:4121] script not found or unable to stat:
> > /usr/share/koha/intranet/cgi-bin/img, referer:
> > http://rel.rcmusic.ca:8080/cgi-bin/koha/admin/smart-rules.pl?branch=$
> > [Fri Aug 05 09:48:50.733791 2016] [cgi:error] [pid 27454] [client
> > 209.20.18.21:4451] script not found or unable to stat:
> > /usr/lib/cgi-bin/img, referer:
> > http://rel.rcmusic.ca:8080/cgi-bin/koha/admin/smart-rules.pl?branch=*
> > [Fri Aug 05 09:48:50.761689 2016] [cgi:error] [pid 27460] [client
> > 209.20.18.21:4455] script not found or unable to stat:
> > /usr/share/koha/intranet/cgi-bin/img, referer:
> > http://rel.rcmusic.ca:8080/cgi-bin/koha/admin/smart-rules.pl?branch=*
> > [Fri Aug 05 09:48:58.391208 2016] [cgi:error] [pid 27466] [client
> > 209.20.18.21:4498] script not found or unable to stat:
> > /usr/lib/cgi-bin/img, referer:
> > http://rel.rcmusic.ca:8080/cgi-bin/koha/admin/smart-rules.pl?branch=RE
> > L [Fri Aug 05 09:48:58.427979 2016] [cgi:error] [pid 27470] [client
> > 209.20.18.21:4502] script not found or unable to stat:
> > /usr/share/koha/intranet/cgi-bin/img, referer:
> > http://rel.rcmusic.ca:8080/cgi-bin/koha/admin/smart-rules.pl?branch=$
> > [Fri Aug 05 09:49:22.835557 2016] [cgi:error] [pid 27489] [client
> > 209.20.18.21:4622] AH01215: [Fri Aug 5 09:49:22 2016] smart-rules.pl:
> > Use of uninitialized value in string eq at
> > /usr/share/koha/intranet/cgi-bin/admin/smart-rules.pl li$ [Fri Aug 05
> > 09:49:23.196508 2016] [cgi:error] [pid 27489] [client
> > 209.20.18.21:4622] script not found or unable to stat:
> > /usr/lib/cgi-bin/img, referer:
> > http://rel.rcmusic.ca:8080/cgi-bin/koha/admin/smart-rules.pl
> > [Fri Aug 05 09:49:23.206655 2016] [cgi:error] [pid 27493] [client
> > 209.20.18.21:4623] script not found or unable to stat:
> > /usr/share/koha/intranet/cgi-bin/img, referer:
> > http://rel.rcmusic.ca:8080/cgi-bin/koha/admin/smart-rules.pl
> >
> >
> > Again, I have no idea why koha is looking for an .../img/ folder, or why
> it's looking in a directory called /usr/lib/cgi-bin/img for cron scripts. I
> installed Koha from packages by the book as I have done dozens of time
> before on 14.04. First time I've ever seen an error like this.
> Interestingly, some scripts, like /usr/share/koha/bin/cronjobs/
> process_message_queue.pl work after checking in and checking out items to
> a patron account, as I get email and SMS messages.
> >
> > Nombre, should I be doing something differently when you say, "Try
> executing from command line instead cron"?
> >
> > Many thanks everyone!
> >
> > Nervously,
> >
> > Craig Butosi, MA, MLIS, B Mus (Hons.)
> > LIBRARY SERVICES MANAGER
> > THE ROYAL CONSERVATORY
> > TELUS Centre for Performance and Learning
> > 273 Bloor Street West
> > Toronto, ON M5S 1W2
> > 416.408.2824 x338
> > www.rcmusic.ca
> >
> > -----Original Message-----
> > From: Koha [mailto:koha-bounces at lists.katipo.co.nz] On Behalf Of
> > Nombre
> > Sent: August-05-16 12:11 AM
> > To: koha at lists.katipo.co.nz
> > Subject: Re: [Koha] [Koha 16.05] CGI Error: "script not found or unable
> to stat: /usr/lib/cgi-bin/img..."
> >
> > El 04/08/16 a las 23:23, Craig Butosi escribió:
> >> Hi all,
> >>
> >> Koha 16.05.02, package install on Ubuntu 14.04.
> >>
> >> I tried to manually run some cronjobs for testing purposes before we
> >> go live in September. One of these is fines.pl, which is located at
> >> /usr/share/koha/bin/cronjobs/fines.pl
> >>
> >> However,
> >>
> >> When running the following at the commandline
> >>
> >> $export KOHA_CONF=/etc/koha/sites/library2/koha-conf.xml [library2
> >> is our instance name, btw] $export PERL5LIB=/usr/share/koha/lib
> >>
> >> $/usr/share/koha/bin/cronjobs/fines.pl
> >
> > Try executing from command line instead cron.
> >
> >>
> >>
> >> No fines are posted to patron account (yes, all sysprefs, circ rules,
> etc are set-up correctly).
> >>
> >> Navigating to intranet-error.log, I find the following:
> >>
> >> [Thu Aug 04 17:10:25.442365 2016] [cgi:error] [pid 2728] [client
> >> 209.20.18.21:18385] script not found or unable to stat:
> >> /usr/lib/cgi-bin/img, referer:
> >> http://rel.rcmusic.ca:8080/cgi-bin/koha/members/pay.pl?borrowernumber
> >> =
> >> 1
> >>
> >>
> >> I haven't the foggiest why it is searching /usr/lib/cgi-bin/img or how
> that happened. It's a non-existent directory. Should it not be trying to
> search elsewhere?
> >>
> >> Please help! :S
> >>
> >> C
> >>
> >> Craig Butosi, MA, MLIS, B Mus (Hons.) LIBRARY SERVICES MANAGER the
> >> royal conservatory TELUS Centre for Performance and Learning
> >> 273 Bloor Street West
> >> Toronto, ON M5S 1W2
> >> 416.408.2824 x338
> >> www.rcmusic.ca<http://www.rcmusic.ca/>
> >>
> >>
> >>
> >> Note: This email message and any attachments are intended only for the
> use of the individual to which it is addressed, and may contain information
> that is privileged, confidential and exempt from disclosure under
> applicable law. If the recipient of this email is not the intended
> recipient (or the employee or agent responsible for delivering the email to
> the intended recipient), you are hereby notified that any review,
> dissemination, distribution or copying or other use of this message is
> strictly prohibited. If you have received this communication in error,
> please notify the sender immediately by return email and delete this
> message and attachments from your system, thank you.
> >> _______________________________________________
> >> Koha mailing list http://koha-community.org Koha at lists.katipo.co.nz
> >> https://lists.katipo.co.nz/mailman/listinfo/koha
> >>
> >
> > _______________________________________________
> > Koha mailing list http://koha-community.org Koha at lists.katipo.co.nz
> > https://lists.katipo.co.nz/mailman/listinfo/koha
> >
> >
> > Note: This email message and any attachments are intended only for the
> use of the individual to which it is addressed, and may contain information
> that is privileged, confidential and exempt from disclosure under
> applicable law. If the recipient of this email is not the intended
> recipient (or the employee or agent responsible for delivering the email to
> the intended recipient), you are hereby notified that any review,
> dissemination, distribution or copying or other use of this message is
> strictly prohibited. If you have received this communication in error,
> please notify the sender immediately by return email and delete this
> message and attachments from your system, thank you.
> >
>
> _______________________________________________
> Koha mailing list http://koha-community.org Koha at lists.katipo.co.nz
> https://lists.katipo.co.nz/mailman/listinfo/koha
>
>
> Note: This email message and any attachments are intended only for the use
> of the individual to which it is addressed, and may contain information
> that is privileged, confidential and exempt from disclosure under
> applicable law. If the recipient of this email is not the intended
> recipient (or the employee or agent responsible for delivering the email to
> the intended recipient), you are hereby notified that any review,
> dissemination, distribution or copying or other use of this message is
> strictly prohibited. If you have received this communication in error,
> please notify the sender immediately by return email and delete this
> message and attachments from your system, thank you.
> _______________________________________________
> Koha mailing list http://koha-community.org
> Koha at lists.katipo.co.nz
> https://lists.katipo.co.nz/mailman/listinfo/koha
>
--
Tomás Cohen Arazi
Theke Solutions (https://theke.io <http://theke.io/>)
✆ +54 9351 3513384
GPG: B2F3C15F
More information about the Koha
mailing list