[PHP] why this code needs mysql.sock instead of mysqld.sock

2008-12-02 Thread ann kok
Hi all
 
 
?php
$link=mysql_connect('localhost','usrname','password');
if(!$link) echo fail;
else echo success;
mysql_close();
?
 
Thank you



  __
Connect with friends from any web browser - no download required. Try the new 
Yahoo! Canada Messenger for the Web BETA at 
http://ca.messenger..yahoo.com/webmessengerpromo.php

Re: [PHP] why this code needs mysql.sock instead of mysqld.sock

2008-12-02 Thread Stut

On 2 Dec 2008, at 20:15, ann kok wrote:

?php
$link=mysql_connect('localhost','usrname','password');
if(!$link) echo fail;
else echo success;
mysql_close();
?


The location of the socket is compiled into the mysql lib. I believe  
it can be changed from php.ini - check the manual for details. If not  
then your easiest option is to create a symlink, or alternatively  
recompile the extension.


-Stut

--
http://stut.net/


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