[Koha] Error with Plack post upgrade to Koha 25.05.00.000

City & Guilds of London Art School Admin admin at cglas.ac.uk
Thu Jun 5 19:24:58 NZST 2025


Hi Jonathan,

Thanks for the ideas. Not sure what you mean by a 500 error there. The web
interfaces and their behavior - OPAC and backend - seem fine. Unfortunately
at this time I'm unable to say what caused the above, as the log I
extracted it from has been error free for the last two days, despite my
attempts to trigger the issue both by interacting with Koha and by
rebooting the server etc.

So far as the System Info page is concerned, Plack still isn't working
though, and CGI entries in the access logs back that up.

What I can produce reliably is this:

/etc/koha$ sudo perl ./plack.psgi -W
Can't locate C4/Koha.pm in @INC (you may need to install the C4::Koha
module) (@INC contains: /etc/perl
/usr/local/lib/x86_64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0
/usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5
/usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.34
/usr/share/perl/5.34 /usr/local/lib/site_perl) at ./plack.psgi line 29.
BEGIN failed--compilation aborted at ./plack.psgi line 29.

Which makes sense. Koha.pm isn't in any of those paths:

sudo find . -type f -iname "Koha.pm" -print
./usr/share/koha/lib/Koha.pm
./usr/share/koha/lib/C4/Koha.pm
./usr/share/koha/lib/Koha/Template/Plugin/Koha.pm

The question is, how on earth did that break?!

The server IDS was segfaulting when it reach /root/.cpan, which makes me
think the OS upgrade broke the CPAN install in some way. If you have any
insights based on the above please let me know, otherwise I think my next
move will be to clean re-install CPAN.

All the best,

Chris




On Mon, Jun 2, 2025 at 10:47 AM Jonathan Druart <
jonathan.druart at bugs.koha-community.org> wrote:

> Hello,
>
> Let's focus on the error 500.
> How do you get it?
> My guess would be that you get "Array found where operator expected"
> because there is a change between perl version (it seems to work ok for me
> on 5.36, but with Ubuntu 22.04 you have 5.34).
> May come from a perl's parser change and the different contextes involved
> in the expression
>   return @{$a} != @{$b} || notall { $_->[0] eq $_->[1] } zip6 @{$a}, @{$b};
> Needs to be confirmed however.
>
> Please clarify how you generate this error and I will try on Ubuntu 22.04.
>
> Regards,
> Jonathan
>
> Le lun. 2 juin 2025 à 10:51, City & Guilds of London Art School Admin <
> admin at cglas.ac.uk> a écrit :
>
>> Hello,
>>
>> Still troubleshooting this but my knowledge of Plack is minimal so I'm
>> hoping someone in the community will have some insights they're willing to
>> share.
>>
>> After a release upgrade to *Ubuntu 22.04.5 LTS* and Koha upgrade to
>> *25.05.00.000*, the following  is returned in the Server Information
>> overview:
>>
>> "PSGI: Koha is running in CGI mode. This is a security issue! Run Koha
>> using Plack for CSRF (cross-site request forgery) protection. More
>> information: koha-plack --help"
>>
>> the plack-error log, I have the following:
>>
>> Array found where operator expected at /usr/share/koha/lib/Koha/Patron.pm
>> line 2356, near "zip6 @"
>> (Do you need to predeclare zip6?)
>> "my" variable $self masks earlier declaration in same scope at
>> /usr/share/koha/lib/Koha/Patron.pm line 2469.
>> Error while loading /etc/koha/plack.psgi: syntax error at
>> /usr/share/koha/lib/Koha/Patron.pm line 2356, near "zip6 @"
>> Global symbol "%attribute_changes" requires explicit package name (did you
>> forget to declare "my %attribute_changes"?) at
>> /usr/share/koha/lib/Koha/Patron.pm line 2364.
>> Global symbol "$is_different" requires explicit package name (did you
>> forget to declare "my $is_different"?) at
>> /usr/share/koha/lib/Koha/Patron.pm line 2369.
>> Global symbol "@new_attributes" requires explicit package name (did you
>> forget to declare "my @new_attributes"?) at
>> /usr/share/koha/lib/Koha/Patron.pm line 2396.
>> Global symbol "$self" requires explicit package name (did you forget to
>> declare "my $self"?) at /usr/share/koha/lib/Koha/Patron.pm line 2437.
>> syntax error at /usr/share/koha/lib/Koha/Patron.pm line 2441, near "}"
>> Can't use global @_ in "my" at /usr/share/koha/lib/Koha/Patron.pm line
>> 2452, near "= @_"
>> Global symbol "$self" requires explicit package name (did you forget to
>> declare "my $self"?) at /usr/share/koha/lib/Koha/Patron.pm line 2453.
>> syntax error at /usr/share/koha/lib/Koha/Patron.pm line 2455, near "}"
>> Can't use global @_ in "my" at /usr/share/koha/lib/Koha/Patron.pm line
>> 2469, near "= @_"
>> /usr/share/koha/lib/Koha/Patron.pm has too many errors.
>> Compilation failed in require at /usr/share/koha/lib/Koha/ILL/Request.pm
>> line 47.
>> BEGIN failed--compilation aborted at
>> /usr/share/koha/lib/Koha/ILL/Request.pm line 47.
>> Compilation failed in require at /usr/share/koha/lib/Koha/ILL/Requests.pm
>> line 23.
>> BEGIN failed--compilation aborted at
>> /usr/share/koha/lib/Koha/ILL/Requests.pm line 23.
>> Compilation failed in require at /usr/share/koha/lib/C4/Circulation.pm
>> line
>> 48.
>> BEGIN failed--compilation aborted at /usr/share/koha/lib/C4/Circulation.pm
>> line 48.
>> Compilation failed in require at /usr/share/koha/lib/Koha/Items.pm line
>> 27.
>> BEGIN failed--compilation aborted at /usr/share/koha/lib/Koha/Items.pm
>> line
>> 27.
>> Compilation failed in require at
>> /usr/share/koha/lib/Koha/ArticleRequest.pm
>> line 26.
>> BEGIN failed--compilation aborted at
>> /usr/share/koha/lib/Koha/ArticleRequest.pm line 26.
>> Compilation failed in require at
>> /usr/share/koha/lib/Koha/ArticleRequests.pm line 25.
>> BEGIN failed--compilation aborted at
>> /usr/share/koha/lib/Koha/ArticleRequests.pm line 25.
>> Compilation failed in require at /usr/share/koha/lib/Koha/Patrons.pm line
>> 26.
>> BEGIN failed--compilation aborted at /usr/share/koha/lib/Koha/Patrons.pm
>> line 26.
>> Compilation failed in require at /usr/share/koha/lib/C4/Budgets.pm line
>> 24.
>> BEGIN failed--compilation aborted at /usr/share/koha/lib/C4/Budgets.pm
>> line
>> 24.
>> Compilation failed in require at /usr/share/koha/lib/C4/Biblio.pm line 90.
>> BEGIN failed--compilation aborted at /usr/share/koha/lib/C4/Biblio.pm line
>> 90.
>> Compilation failed in require at /usr/share/koha/lib/Koha/Biblio.pm line
>> 28.
>> BEGIN failed--compilation aborted at /usr/share/koha/lib/Koha/Biblio.pm
>> line 28.
>> Compilation failed in require at /usr/share/koha/lib/Koha/Biblios.pm line
>> 24.
>> BEGIN failed--compilation aborted at /usr/share/koha/lib/Koha/Biblios.pm
>> line 24.
>> Compilation failed in require at /usr/share/koha/lib/Koha/Libraries.pm
>> line
>> 24.
>> BEGIN failed--compilation aborted at /usr/share/koha/lib/Koha/Libraries.pm
>> line 24.
>> Compilation failed in require at /usr/share/koha/lib/C4/Koha.pm line 27.
>> BEGIN failed--compilation aborted at /usr/share/koha/lib/C4/Koha.pm line
>> 27.
>> Compilation failed in require at /etc/koha/plack.psgi line 29.
>> BEGIN failed--compilation aborted at /etc/koha/plack.psgi line 29.
>> Child process 4895 exited with status 255
>>
>> ==
>>
>> Other details:
>>
>> perl --version: "This is perl 5, version 34, subversion 0 (v5.34.0)"
>> mysql --version: Ver 15.1 Distrib 10.6.22-MariaDB
>>
>> All required perl modules are installed according to About Koha -> Perl
>> Modules.
>>
>> Output from koha-plack --status is this when run as an ordinary user:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *koha-plack --status <instance>WARNING: koha-plack requires some Apache
>> modules that you are missing.You can install them with:    sudo a2enmod
>> headers proxy_http Permission denied:
>> /etc/koha/sites/<instance>/koha-conf.xmlPermission denied:
>> /etc/koha/sites/<instance>/koha-conf.xmlfailed to load external entity
>> "/etc/koha/sites/<instance>/koha-conf.xml" * Plack running for <instance>
>> *
>>
>> But when run as sudo I have:
>>
>>
>>
>> *sudo koha-plack --status <instance>[sudo] password for systems:  * Plack
>> running for <instance>*
>>
>> This makes me think there's a permissions issue, but so far I don't see
>> where that could be. Also, the php modules "headers" and "proxy_http" are
>> definitely installed and enabled.
>>
>> Thanks and all the best,
>>
>> Chris
>> _______________________________________________
>>
>> Koha mailing list  http://koha-community.org
>> Koha at lists.katipo.co.nz
>> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>>
>


More information about the Koha mailing list