[Koha] 2.2.8 - MinPasswordLength syspref bug

Mike Dalgity dalgity at htl.net
Mon Apr 30 05:03:08 NZST 2007

Just a heads up to anyone running 2.2.8 that there's a small bug that will
prevent changing the MinPasswordLength in system preferences.  In
/scripts/updater/updatedatabase the following section makes the
modifications to the database:
            uniquefieldrequired => 'variable',
            variable            => 'MinPasswordLength',
            value               => '5',
            forceupdate         => {
                'explanation' => 1,
                'type' => 1
            explanation => "Minimum length for patron passwords",
            type => 'YesNo',
            value =>5,

The bug is caused by the type being set to YesNo.  If you try to change the
value of this preference you'll get a 500 Internal Server Error and the
following in the error log:

[Sun Apr 29 11:11:38 2007] [error] [client] Premature end of
script headers: /var/www/koha/intranet/cgi-bin/admin/systempreferences.pl
The given value does not seem to be interpretable as a Boolean value at
/var/www/koha/intranet/modules/C4/Boolean.pm line 104.

I fixed it by changing and rerunning the update script but you could also
modify the database directly.

1) In the section of /scripts/updater/updatedatabase quoted above change the
type => 'YesNo',
type => 'Integer',

2) Set environment variables
export KOHA_CONF=/path/to/koha.conf
export PERL5LIB=/path/to/koha/intranet/modules

3) Run the update script
perl updatedatabase

Mike D.

More information about the Koha mailing list