[Koha] Error with Plack post upgrade to Koha 25.05.00.000

Jonathan Druart jonathan.druart at bugs.koha-community.org
Mon Jun 2 21:47:10 NZST 2025


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