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

sdstein7 sdstein7 at gmail.com
Wed Jul 8 03:12:22 NZST 2009


Joe,

Thanks for your followup.  Please see my responses below labeled "SS":

Joe Atzberger wrote:
> 
>>
>> 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.
> 
>       SS:  Yes, I am using a real username and password.  The username
> matches the value in the GRANT
>              command.  The GRANT command does not ask for a password, but
> I am using the one assigned
>              when I created the account, and I can login to mysql using
> that password.
> 
> 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.
> 
>       SS:  Yes, I can create tables, insert values, select values, delete
> values, drop tables, etc.
> 
> 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.
> 
>       SS:  The code pulls the values from context->config, which I assume
> get its values from 
>              from koha-conf.xml.  The values in koha-conf.xml are correct
> for hostname, database, port, user
>              and pass.
> 
> 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.
> 
>       SS:  SetEnv KOHA_CONF is correct in the <VIrtualHost> section of
> httpd.conf.
>              After making this change, I rebooted the server.
> 
> --Joe
> 
>       SS:  If you have any other suggestions, they are greately
> appreciated.
> 
> _______________________________________________
> Koha mailing list
> Koha at lists.katipo.co.nz
> http://lists.katipo.co.nz/mailman/listinfo/koha
> 
> 

-- 
View this message in context: http://www.nabble.com/Can%27t-locate-object-method-connect-via-package-DBI-tp24310000p24375213.html
Sent from the Koha - Discuss mailing list archive at Nabble.com.



More information about the Koha mailing list