[Koha] Can't locate object method connect via package DBI

Joe Atzberger ohiocore at gmail.com
Sat Jul 4 09:15:54 NZST 2009


>
> If it helps, here is the statement I am using in my small test script:
> $dbh = DBI->connect("DBI:mysql:koha","<username>","<password>")
>

I assume you are using a real username in place of <username> and a real
password in place of <password>, and the matching values in the GRANT
commands.

If you can connect on command line, as you suggest, then please also test
some critical operations like create a new table and then deleting it.
Those are the kinds of permissions that your Koha user needs to have at
installation.  Getting in is not enough.

The exact statement Koha uses is:
    my $dbh=
DBI->connect("DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port",
$db_user, $db_passwd);

All the strings with dollar signs ($) prepended are variables populated with
values from the bottom of koha-conf.xml.

Make sure your Apache VirtualHost config uses SetEnv KOHA_CONF ... with the
correct path to your koha-conf.xml file.  This should be the same file path
you reference in shell by saying something like:

export KOHA_CONF=/path/to/my/koha-conf.xml

Otherwise you are testing something different than Apache is seeing.  If you
edited the Apache configs at all, remember to do a (graceful) restart to
make them take effect.

--Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.katipo.co.nz/pipermail/koha/attachments/20090703/92b44acc/attachment.htm 


More information about the Koha mailing list