[Koha] Export page failing to load and related error

Evan Stewart evanstewart406 at gmail.com
Wed Jul 24 07:44:48 NZST 2024


--The answer was posted in another thread. Reposting here for consistency.--

All,

I stumbled across the answer (prayer works!).

I checked to see if the "cgi" Apache module was installed and enabled. It
wasn't! The module "cgid" was enabled, but not "cgi". Apparently, the
export.pl script requires regular "cgi".

To fix, I logged into the server terminal and ran the commands:

   - sudo a2enmod cgi
      - the output indicated that it was not already enabled.
      - sudo systemctl restart apache2

When I logged back into the staff interface in Koha, the Export Catalog
Data tool worked.

The odd thing is that I have the cgi module enable step in my server build
documentation. I'm not sure why it didn't install then. I noticed that cgid
was enabled (so maybe it took precedence when I originally attempted to
enable "cgi").

Enabling the "cgi" Apache module fixed the problem.

-Evan

On Fri, Jul 19, 2024 at 4:15 PM Evan Stewart <evanstewart406 at gmail.com>
wrote:

> Hello,
>
> I located an error message in the log. Looks like I'm getting a permission
> denied error for exports.pl.
>
> *[cgid:error] [pid 554389:tid 554389] (13)Permission denied: [client
> 172.56.200.129:42349 <http://172.56.200.129:42349>] AH01257: stderr from
> /usr/share/koha/intranet/cgi-bin/tools/export.pl <http://export.pl>: unable
> to connect to cgi daemon after multiple tries, referer:
> http://Ipaddress:8081/cgi-bin/koha/tools/inventory.pl
> <http://Ipaddress:8081/cgi-bin/koha/tools/inventory.pl>*
>
> When I checked the permission for the file, they are the same as other
> files in the "... /cgi-bin/tools" directory. The file inventory.pl
> permissions are the same as export.pl. The inventory page works on the
> front end.
>
> I don't understand why I'm getting a permission error on export.pl but
> not the others.
>
> -Evan
>
> On Wed, Jul 17, 2024 at 6:48 AM Evan Stewart <evanstewart406 at gmail.com>
> wrote:
>
>> Hi David,
>>
>> Thank you for the tip on Koha-shell. I ran the export script using
>> koha-shell and it generated some results. Now to figure out why it fails on
>> the front end.
>>
>> On the server, I ran the commands:
>> sudo koha-shell *myInstanceName*
>>
>> (once inside the koha-shell):
>>  /usr/share/koha/bin/export_records.pl
>>
>> -Evan
>>
>> On Mon, Jul 15, 2024 at 4:58 PM David Nind <david at davidnind.com> wrote:
>>
>>> Hi Evan.
>>>
>>> On Tue, 16 Jul 2024 at 07:49, Evan Stewart <evanstewart406 at gmail.com>
>>> wrote:
>>>
>>>> Hi David,
>>>>
>>>> Thank you for the tips.
>>>>
>>>> I'm using Koha 23.11.06.000. I have a few thousand records in my
>>>> instance with multiple libraries created in the same instance.
>>>>
>>>> The error page appears when I click "export catalog data". It fails
>>>> before getting to the query page.
>>>>
>>>> When I run the command line script, I receive the following error.
>>>>
>>>> *Command:*
>>>> /usr/bin/perl /usr/share/koha/bin/export_records.pl
>>>>
>>>> *Message:*
>>>> Can't locate Koha/Script.pm in @INC (you may need to install the
>>>> Koha::Script module) (@INC contains: /etc/perl
>>>> /usr/local/lib/i386-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1
>>>> /usr/lib/i386-linux-gnu/perl5/5.32 /usr/share/perl5
>>>> /usr/lib/i386-linux-gnu/perl-base /usr/lib/i386-linux-gnu/perl/5.32
>>>> /usr/share/perl/5.32 /usr/local/lib/site_perl) at /usr/share/koha/bin/
>>>> export_records.pl line 25.
>>>> BEGIN failed--compilation aborted at /usr/share/koha/bin/
>>>> export_records.pl line 25.
>>>>
>>>> *Odd thing: *I see that Koha/Script.pm is located at
>>>> /usr/share/koha/lib/Koha/Script.pm
>>>>
>>>>
>>>> Any advice?
>>>>
>>>> -Evan
>>>>
>>>
>>> I've never run Koha in a production environment, but I think this is
>>> something to with the environment variables.
>>>
>>> Were you logged in to your server as root?
>>>
>>> I think you need to use sudo koha-shell yourinstancename (then Koha will
>>> have the right settings for your instance of Koha).
>>>
>>> This should work with package installs, but if Koha was installed a
>>> different way then I'm not sure.
>>>
>>> Hopefully, others can comment further on how this should be done
>>> correctly, and the location of the files (as I don't know).
>>>
>>> (I've included your reply to me and sent to the mailing list - for some
>>> reason the default with the general mailing list is to reply to the sender
>>> and not reply all.)
>>>
>>> David Nind
>>> New Zealand
>>>
>>


More information about the Koha mailing list