Urgent 2.2.6 to 2.2.9 upgrade help
Listers, I am in the small developing nation of the Cook Islands upgrading a Koha 2.2.6 server to 2.2.9. I was not feeling comfortable with the 3.0 so I thought it safer to go with 2.2.9 - especially since I only am in the country for a few days and there is no local expertise. The server is debian etch. Now, I have run the koha.upgrade script, which complained a little bit but completed successfully. Everything seemed to be working fine as I tested all of the opac screens one by one, but when i turned to the staff screens, I received 500 errors when I issue a book, add a borrower, and view a borrower's details. The error log reports that circulation.pl, memberentry.pl, and moremember.pl get "Premature end of script headers". Which reminds me of when I write perl cgis on Windows and then load them on a linux server without fixing the line feeds. It is possible that other scripts have this problem as well. I have only about 48 hours left to work on this problem and I do not even know where to begin diagnosing the problem. Please help! I have attached the 3 files in a tarball if the list supports that. -cht Chris Hammond-Thrasher Library Systems Manager USP Library Suva, Fiji current mobile (in the Cooks): +682 77315 ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/
hammondthrasher_c@usp.ac.fj wrote:
The error log reports that circulation.pl, memberentry.pl, and moremember.pl get "Premature end of script headers". Which reminds me of when I write perl cgis on Windows and then load them on a linux server without fixing the line feeds. It is possible that other scripts have this problem as well.
The "Premature end of script headers" often occurs at the beginning of script execution before the perl script hsa had a chance to output the HTTP headers. Thus, the CGI complains that no headres have been output. You can make a small tweak to the perl scripts in question so that any errors that occur are trapped and output to your browser. Manually in an editor, where you see this: use CGI; and a line thereafter: use CGI::Carp qw(fatalsToBrowser); Or if you are brave, you can add this line automatically to all scripts in Koha: cd /usr/local/koha find . -wholename *cgi-bin/*.pl -exec sed '-i~' \ -e 's|use CGI|use CGI::Carp qw(fatalsToBrowser); use CGI|' {} \; (The last two lines are one command-line, but I've split it so it is more readable in email.) HTH! cheers rickw -- ________________________________________________________________ Rick Welykochy || Praxis Services || Internet Driving Instructor Do you realise that in forty years we'll have thousands of old ladies running around with tattoos and rap music will be the golden oldies? -- Maxine
I type too fast sans reading! .... Rick Welykochy wrote:
You can make a small tweak to the perl scripts in question so that any errors that occur are trapped and output to your browser.
Manually in an editor, where you see this:
use CGI;
and a line thereafter:
then *ADD* a line thereafter:
use CGI::Carp qw(fatalsToBrowser);
-- ________________________________________________________________ Rick Welykochy || Praxis Services || Internet Driving Instructor The manual said Windows XP/SP2 or better so I installed Linux.
Rick - thanks for that. I had a look in the apache error log (not the koha error log) and there is some interesting info. The circulation.pl script seems to be failing because Dat:Manip cannot determine the time zone. However, I ran "tzconfig" a couple of days ago to ensure the timezone is set to Pacific/Cook Islands. Sure enough, "date" yields: Wed Sep 3 20:07:08 CKT 2008 Is there another way to set the timezone to make Date::Manip happy? -cht Apache log fragment: ERROR: Date::Manip unable to determine TimeZone. at /usr/share/perl5/Date/Manip.pm line 3637 Date::Manip::Date_TimeZone called at /usr/share/perl5/Date/Manip.pm line 678 Date::Manip::Date_Init() called at /usr/share/perl5/Date/Manip.pm line 1 448 Date::Manip::ParseDate('today') called at /usr/local/koha/intranet/cgi-b in/members/moremember.pl line 145 ERROR: Date::Manip unable to determine TimeZone. at /usr/share/perl5/Date/Manip.pm line 3637 Date::Manip::Date_TimeZone called at /usr/share/perl5/Date/Manip.pm line 678 Date::Manip::Date_Init() called at /usr/share/perl5/Date/Manip.pm line 8 01 Date::Manip::ParseDateString('2007-11-08') called at /usr/share/perl5/Da te/Manip.pm line 1542 Date::Manip::DateCalc('2007-11-08', '- 14 days') called at /usr/local/k oha/intranet/cgi-bin/circ/circulation.pl line 126 Quoting Rick Welykochy <rick@praxis.com.au>:
I type too fast sans reading! ....
Rick Welykochy wrote:
You can make a small tweak to the perl scripts in question so that any errors that occur are trapped and output to your browser.
Manually in an editor, where you see this:
use CGI;
and a line thereafter:
then *ADD* a line thereafter:
use CGI::Carp qw(fatalsToBrowser);
-- ________________________________________________________________ Rick Welykochy || Praxis Services || Internet Driving Instructor
The manual said Windows XP/SP2 or better so I installed Linux.
------------------------------------------------- This mail sent through IMP: http://horde.org/imp/
hammondthrasher_c@usp.ac.fj wrote:
Is there another way to set the timezone to make Date::Manip happy?
Google finds many different causes. <http://prlmnks.org/html/400332.html> has some good advice. You should be able to test it out on your system based on the advice given in the above page. cheers rickw -- ________________________________________________________________ Rick Welykochy || Praxis Services || Internet Driving Instructor Do you realise that in forty years we'll have thousands of old ladies running around with tattoos and rap music will be the golden oldies? -- Maxine
On 2008/09/4, at 6:56 PM, Rick Welykochy wrote:
hammondthrasher_c@usp.ac.fj wrote:
Is there another way to set the timezone to make Date::Manip happy?
Google finds many different causes.
<http://prlmnks.org/html/400332.html> has some good advice.
You should be able to test it out on your system based on the advice given in the above page.
Heya Chris. try something like .. $ENV{TZ} = 'CKT'; up the top of your file perhaps
Mason James wrote:
Heya Chris.
try something like ..
$ENV{TZ} = 'CKT';
up the top of your file perhaps
Hopefully that will work. But it does beg the question as to why, on my working system, that env variable is not set and yet Date::Manip does not whine about the timezone. There must be something deeper in Linux that passes this information on to Perl, such as /etc/timezone, which I do have on my system. It contains the results of the tzconfig command, e.g. Australia/NSW cheers rickw -- ________________________________________________________________ Rick Welykochy || Praxis Services || Internet Driving Instructor Do you realise that in forty years we'll have thousands of old ladies running around with tattoos and rap music will be the golden oldies? -- Maxine
On 2008/09/4, at 7:21 PM, Rick Welykochy wrote:
Mason James wrote:
Heya Chris. try something like .. $ENV{TZ} = 'CKT'; up the top of your file perhaps
ah make that something like .. $ENV{TZ} = 'EAST'; CKT isnt valid http://search.cpan.org/~sbeck/Date-Manip-5.54/lib/Date/Manip.pod#___top
Mason and Rick, Thanks for the thoughts. I will try out your suggestions when I get access to the box again in an hour or two. I am starting to have partial memories about encountering and resolving this problem while doing the initial 2.2.6 install two years ago, but I did not make any notes about the matter. Back then, I was humbled by SQL syntax differences between MySQL 4 and 5. More soon... -cht Quoting Mason James <mason.loves.sushi@gmail.com>:
On 2008/09/4, at 7:21 PM, Rick Welykochy wrote:
Mason James wrote:
Heya Chris. try something like .. $ENV{TZ} = 'CKT'; up the top of your file perhaps
ah make that something like ..
$ENV{TZ} = 'EAST';
CKT isnt valid
http://search.cpan.org/~sbeck/Date-Manip-5.54/lib/Date/Manip.pod#___top
------------------------------------------------- This mail sent through IMP: http://horde.org/imp/
Timezones must be imported into mysql as well as present on the system. See the script: mysql_tzinfo_to_sql Rather than edit the files to modify ENV, you can put in your Apache2 configuration, for each VirtualHost (or the main config): SetEnv TZ "CST" HTH, --joe On Thu, Sep 4, 2008 at 1:46 PM, <hammondthrasher_c@usp.ac.fj> wrote:
Mason and Rick,
Thanks for the thoughts. I will try out your suggestions when I get access to the box again in an hour or two.
I am starting to have partial memories about encountering and resolving this problem while doing the initial 2.2.6 install two years ago, but I did not make any notes about the matter. Back then, I was humbled by SQL syntax differences between MySQL 4 and 5.
More soon...
-cht
Quoting Mason James <mason.loves.sushi@gmail.com>:
On 2008/09/4, at 7:21 PM, Rick Welykochy wrote:
Mason James wrote:
Heya Chris. try something like .. $ENV{TZ} = 'CKT'; up the top of your file perhaps
ah make that something like ..
$ENV{TZ} = 'EAST';
CKT isnt valid
------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
Mason, Rick, and Joe (and anyone else who was looking into this), It turns out that the solution is much easier than we had been discussing. Date::Manip is working just as expected and documented by checking for the system's timezone in various places including environment variables, the shell command `data`, and in /etc/timezone . The problem is that Date::Manip does not know what to make of having "Pacific/Rarotonga" in /etc/timezone or "CKT" in the output of `date`. Both of these are set by tzconfig. To solve the problem, I reran tzconfig and set the timezone to Hawaii (the same zone as the Cook Islands) which set /etc/timezone to "US/Hawaii" and the output of `date` to "HST". When I have time, I'll file this as a bug with the author of Date::Manip. I assume he/she wants to support all of the timezones that ship with major linux distros. Thanks again for all of your help! -cht Quoting Joe Atzberger <ohiocore@gmail.com>:
Timezones must be imported into mysql as well as present on the system. See the script: mysql_tzinfo_to_sql
Rather than edit the files to modify ENV, you can put in your Apache2 configuration, for each VirtualHost (or the main config): SetEnv TZ "CST"
HTH, --joe
On Thu, Sep 4, 2008 at 1:46 PM, <hammondthrasher_c@usp.ac.fj> wrote:
Mason and Rick,
Thanks for the thoughts. I will try out your suggestions when I get access to the box again in an hour or two.
I am starting to have partial memories about encountering and resolving this problem while doing the initial 2.2.6 install two years ago, but I did not make any notes about the matter. Back then, I was humbled by SQL syntax differences between MySQL 4 and 5.
More soon...
-cht
Quoting Mason James <mason.loves.sushi@gmail.com>:
On 2008/09/4, at 7:21 PM, Rick Welykochy wrote:
Mason James wrote:
Heya Chris. try something like .. $ENV{TZ} = 'CKT'; up the top of your file perhaps
ah make that something like ..
$ENV{TZ} = 'EAST';
CKT isnt valid
------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
------------------------------------------------- This mail sent through IMP: http://horde.org/imp/
participants (4)
-
hammondthrasher_c@usp.ac.fj -
Joe Atzberger -
Mason James -
Rick Welykochy