[Koha] step 3 loop in installer, and a long story

Tim Middleton tim at xxvii.net
Mon May 12 12:06:09 NZST 2008


I'm attempting to get 3.0 beta 2 running to evaluate. I've had a few
difficulties, but have it up and running far enough to get to port 8080 and
run the web installer, however the web installer will not advanced past
step 3 for me.

The last page before the loop says "Success" and "Database tables created",
but then the "Next>>" button just goes back to "Now we're ready to create
the database..."

I note that no tables have yet been created in the database.

And first of the raft of errors submitting step 3 sends to the web log
appears to be a database lookup:

install.pl: DBD::mysql::st execute failed:
Table 'koha.language_subtag_registry' doesn't exist
at /home/x/koha/lib/C4/Languages.pm line 178.

I in the logs that installer.pl seems to be trying to do a large number of
lookups (presumably for configuration options) at every step, even step
1... so perhaps this is a red herring, and these lookups are logged and
supposted to fail gracefully until the tables/data gets created.

Googling found me:

http://lists.koha.org/pipermail/koha-cvs/2007-July/014261.html

A checkin which states step 3 loops if <kohaversion> does not exist in xml a
loop like I am experiencing will occur. And indeed there is no
<kohaversion> in my koha-conf.xml ... but surely this is an old bug which
would no longer apply, and why would my generated koha-conf.xml not have
the tag if it was needed?

Any ideas?

Anyhow, for the record, if anyone is interested, I also wanted to share my
experience up to this point. I'll try to be as brief as I can. 

I'm doing this on a FreeBSD 7.0 amd64 machine. Apache 2.2.8, perl 5.8.8,
Zebra 2.0.28. I'm a fairly experienced sysadmin. 

I read the INSTALL file, and hence ran the perl Makefile.PL. I chose the
local install option, seeing the install directory to ~/koha.

No problems. I noted the long list of warnings about missing perl modules at
the end, but fired up the browser to 8080 anyhow to see what would happen.
The errors were strange in the web logs, and nothing at all printed via
browser, and i haven't really used perl for nearly a decade ... but i
started hacking away anyhow trying to get a meaningful error message. The
error message I was getting was:

  Can't locate object method "preference" via package "C4::Context"
at /home/x/koha/lib/C4/Context.pm line 30.

Commented some stuff out in Context.pm which eventually at least started
getting the perl error messages dumped to the browser, where I could see
the real error message was:

  Can't locate CGI/Session.pm in @INC

And so I realised I am indeed going to have to install all those missing
perl modules before getting any further. Now, what modules to install
again? I looked on the wiki and see the install instructions for all sorts
of platforms, but all of those instructions seem rather specific lists of
commands, and assume various distros have some modules already installed,
etc. 

Anyhow, i decided to try install-CPAN.pl, which I'd noticed mentioned in the
INSTALL text. Didn't work at all for me. I have no idea why. I wasn't too
disappointed, and didn't try too hard with it, because I really didn't want
to spam my test system with a hundreds of perl modules anyhow.

But next i searched through the source code to find whatever was generating
the list of warnings the Makefile.PL had given me. I found the list of
modules in (but surprise!) Makefile.PL. I then fiddled with "perl -MCPAN"
until i figured out how to install modules using it to ~/koha rather than
the system.

A few false starts there trying to automate the process with shell script
and the list ripped from Makefile.PL, but eventually i got all the modules
and dependencies installed under ~/koha/lib (and did a bunch of fiddling
with the apache SetEnv to get all the @INC paths needed) and the :8080 web
interface seemed to work okay at that point. 

Now i should mention, I chose Pg for database driver when asked in
Makefile.PL. I had my trusty postgresql database set up and ready to go. It
was only later that I read in the mailing list that reportedly postgresql
support doesn't really work at all. )-: I had been excited to read that
postgresql would be supported. Maybe the Makefile.PL should be more clear
than just saying it's "experimental"? I had tried installing using it
anyhow, to see what would happen. I made it to the step 3 loop described
above. 

Wondering if it was postgresql that was the problem there, I scrounged up a
MySQL 5.0 instance and set it up for koha. I went into
~/koha/etc/koha-conf.xml and changed the driver name and port. 

And I ended up on the step 3 loop again.

That's my story. Points to perhaps take away if you got this far:

- Might be nice if the web installer script, as a very first step, simply
checked dependency problems and gave a simple error if it found them (there
seems to be a check at step 2 actually, but if some dependencies are
missing (CGI::Session!) one never gets that far.)

- weird how the languages in the dropdown on step 1 are seemingly in random
order.

- might want to discourage more strongly the use of postgresql if indeed it
really doesn't work at all.

- might be nice if install-CPAN.pl (whatever it does) could install CPAN
modules locally as I did manually. Possibly this would be the case with the
the .cpan/CPAN/MyConfig.pm i ended up using? I don't know. 

- are there generic install instructions anywhere? Something like an
organized complete list of dependencies. A simple SQL file to set up the
database? koha-conf.xml config file reference, which instructions on which
settings absolutely needed to get the thing to run? 

I'll probably eventually look through install.pl and see if i can figure out
what's going on. But hopefully it doesn't come to that. 

Sorry, somewhat failed in trying to be brief. <-;











More information about the Koha mailing list