Thanks for the reply. I forgot about the php.ini file. That seemed to
point me in the right direction.

However, although PHP is now looking at the correct file. I still get
the error message:

Warning: mysql_connect(): Can't connect to local MySQL server through
socket '/var/lib/mysql/mysql.sock' (13) in
/usr/local/apache2/htdocs/dbtest.php on line 3


Do you have any idea why it would not connect even though its looking at
the correct file?

Here is the line from the PHP.ini file after I edited it (incase I did
something retarded)

mysql.default.socket = /var/lib/mysql/mysql.sock

-----Original Message-----
From: Jay Blanchard [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 25, 2003 9:06 AM
To: Donald Tyler; [EMAIL PROTECTED]
Subject: RE: [PHP] mysql.sock file location

[snip]
I meant "mysql.sock", sorry.

Does anyone know how to tell PHP to look in a different location for the
mysql.lock file? It's currently looking in /tmp/ and that's wrong.
[/snip]

But MySQL is running? PHP AFAIK doesn't care where mysql.sock is, unless
it is not the default.

locate mysql.sock
look in my.conf to see if the paths match
if not, change the path in my.conf and restart mysql

There is a PHP directive in the php.ini

; Default socket name for local MySQL connects.  If empty, uses the
built-in
; MySQL defaults.
mysql.default_socket =

where you can specify the location of the sock if need be.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to