still looking for mysql @ localhost
guys, gud day! i just successfully installed KOHA but mysql is not residing on the same pc. i'd tweaked some statements in the Install.pm (include -h $hostname to every mysql and mysqladmin commands) to make it work. but now, when im trying to search for a book, the system still looks @ localhost for the database. below is the logs: [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] DBI->connect(:) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /www/koha/intranet/modules/C4/Context.pm line 411 [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] DBI->connect(:) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /www/koha/intranet/modules/C4/Context.pm line 411 [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] Can't call method "prepare" on an undefined value at /www/koha/opac/cgi-bin/opac-main.pl line 16. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] Premature end of script headers: opac-main.pl how should i go about this? thanks in advance eric
eric salayon a écrit :
guys,
gud day!
i just successfully installed KOHA but mysql is not residing on the same pc. i'd tweaked some statements in the Install.pm (include -h $hostname to every mysql and mysqladmin commands) to make it work. but now, when im trying to search for a book, the system still looks @ localhost for the database. below is the logs:
[Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] DBI->connect(:) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /www/koha/intranet/modules/C4/Context.pm line 411 [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] DBI->connect(:) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /www/koha/intranet/modules/C4/Context.pm line 411 [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] Can't call method "prepare" on an undefined value at /www/koha/opac/cgi-bin/opac-main.pl line 16. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] Premature end of script headers: opac-main.pl
how should i go about this? thanks in advance
eric _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
where is your koha.conf file ? If it is not in /etc, you need to add a line : SetEnv KOHA_CONF=/path/to/koha.conf to your apache koha virtual host. Does your apache user have read access to this file ? (chown httpd:httpd /etc/koha.conf if you have /etc/koha.conf file) HTH. -- Henri-Damien LAURENT
what has koha.conf got to do with this error? [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] DBI->connect(:) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /www/koha/intranet/modules/C4/Context.pm line 411 On 6/1/06, Henri-Damien LAURENT <laurenthdl@alinto.com> wrote:
eric salayon a écrit :
guys,
gud day!
i just successfully installed KOHA but mysql is not residing on the same pc. i'd tweaked some statements in the Install.pm (include -h $hostname to every mysql and mysqladmin commands) to make it work. but now, when im trying to search for a book, the system still looks @ localhost for the database. below is the logs:
[Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] DBI->connect(:) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /www/koha/intranet/modules/C4/Context.pm line 411 [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] DBI->connect(:) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /www/koha/intranet/modules/C4/Context.pm line 411 [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] Can't call method "prepare" on an undefined value at /www/koha/opac/cgi-bin/opac-main.pl line 16. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] Premature end of script headers: opac-main.pl
how should i go about this? thanks in advance
eric _______________________________________________ Koha mailing list Koha@lists.katipo.co.nz http://lists.katipo.co.nz/mailman/listinfo/koha
where is your koha.conf file ? If it is not in /etc, you need to add a line : SetEnv KOHA_CONF=/path/to/koha.conf to your apache koha virtual host.
Does your apache user have read access to this file ? (chown httpd:httpd /etc/koha.conf if you have /etc/koha.conf file)
HTH. -- Henri-Damien LAURENT
On Fri, Jun 02, 2006 at 09:35:52AM +0800, eric salayon said:
what has koha.conf got to do with this error?
[Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] DBI->connect(:) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /www/koha/intranet/modules/C4/Context.pm line 411
Because /etc/koha.conf is what you should have edited. The 2nd line of koha.conf contains the hostname hostname=localhost And thats what C4::Context uses to create a database handler. If it cant read the /etc/koha.conf file or you havent changed the hostname there it will be defaulting to trying to use localhost Chris -- Chris Cormack Programmer 027 4500 789 Katipo Communications Ltd chris@katipo.co.nz www.katipo.co.nz
the file koha.conf on /etc has the this: database=Koha hostname=10.0.3.1 user=kohaadmin pass=passwordkoha intranetdir=/www/koha/intranet opacdir=/www/koha/opac kohalogdir=/var/log/koha kohaversion=2.2.5 httpduser=apache intrahtdocs=/www/koha/intranet/htdocs/intranet-tmpl opachtdocs=/www/koha/opac/htdocs/opac-tmpl and the file has this access list : [root@qcmail root]# ls -l /etc/koha.conf -r--r----- 1 apache apache 275 May 29 17:43 /etc/koha.conf any other ideas? tnx 4 your suggestions ang time eric On 6/2/06, Chris Cormack <chris@katipo.co.nz> wrote:
On Fri, Jun 02, 2006 at 09:35:52AM +0800, eric salayon said:
what has koha.conf got to do with this error?
[Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] DBI->connect(:) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /www/koha/intranet/modules/C4/Context.pm line 411
Because /etc/koha.conf is what you should have edited.
The 2nd line of koha.conf contains the hostname hostname=localhost
And thats what C4::Context uses to create a database handler.
If it cant read the /etc/koha.conf file or you havent changed the hostname there it will be defaulting to trying to use localhost
Chris
-- Chris Cormack Programmer 027 4500 789 Katipo Communications Ltd chris@katipo.co.nz www.katipo.co.nz
On Fri, Jun 02, 2006 at 10:20:38AM +0800, eric salayon said:
the file koha.conf on /etc has the this:
database=Koha hostname=10.0.3.1 user=kohaadmin pass=passwordkoha intranetdir=/www/koha/intranet opacdir=/www/koha/opac kohalogdir=/var/log/koha kohaversion=2.2.5 httpduser=apache intrahtdocs=/www/koha/intranet/htdocs/intranet-tmpl opachtdocs=/www/koha/opac/htdocs/opac-tmpl
That looks good
and the file has this access list :
[root@qcmail root]# ls -l /etc/koha.conf -r--r----- 1 apache apache 275 May 29 17:43 /etc/koha.conf
And apache runs as use apache? Because
read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10]
Is the error you get when the process running cant read the /etc/koha.conf file Chris -- Chris Cormack Programmer 027 4500 789 Katipo Communications Ltd chris@katipo.co.nz www.katipo.co.nz
this is the error that i got: [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] DBI->connect(:) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /www/koha/intranet/modules/C4/Context.pm line 411 [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] DBI->connect(:) failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) at /www/koha/intranet/modules/C4/Context.pm line 411 [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] Can't call method "prepare" on an undefined value at /www/koha/opac/cgi-bin/opac-main.pl line 16. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] Premature end of script headers: opac-main.pl eric On 6/2/06, Chris Cormack <chris@katipo.co.nz> wrote:
On Fri, Jun 02, 2006 at 10:20:38AM +0800, eric salayon said:
the file koha.conf on /etc has the this:
database=Koha hostname=10.0.3.1 user=kohaadmin pass=passwordkoha intranetdir=/www/koha/intranet opacdir=/www/koha/opac kohalogdir=/var/log/koha kohaversion=2.2.5 httpduser=apache intrahtdocs=/www/koha/intranet/htdocs/intranet-tmpl opachtdocs=/www/koha/opac/htdocs/opac-tmpl
That looks good
and the file has this access list :
[root@qcmail root]# ls -l /etc/koha.conf -r--r----- 1 apache apache 275 May 29 17:43 /etc/koha.conf
And apache runs as use apache?
Because
read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229. [Tue May 30 09:33:50 2006] [error] [client 10.0.0.10]
Is the error you get when the process running cant read the /etc/koha.conf file
Chris -- Chris Cormack Programmer 027 4500 789 Katipo Communications Ltd chris@katipo.co.nz www.katipo.co.nz
On Fri, Jun 02, 2006 at 10:28:03AM +0800, eric salayon said:
this is the error that i got:
[Tue May 30 09:33:50 2006] [error] [client 10.0.0.10] read_config_file(/etc/koha.conf) returned undef at /www/koha/intranet/modules/C4/Context.pm line 229.
Yep, which means that it cant read the /etc/koha.conf file. So you will want to check that apache is running as user apache, not www-data or nobody or some other user. IF it is running as some other user, you will need to make sure that user has read permissions to the /etc/koha.conf file Chris -- Chris Cormack Programmer 027 4500 789 Katipo Communications Ltd chris@katipo.co.nz www.katipo.co.nz
participants (3)
-
Chris Cormack -
eric salayon -
Henri-Damien LAURENT