From: [EMAIL PROTECTED] Operating system: Linux 2.2.17/2.4.8 PHP version: 4.2.0 PHP Bug Type: MySQL related Bug description: Cannot connect to local mysql server via socket file
I think nobody has reported this before. I cannot connect to the mysql server on the localhost via the mysql socket file, neither with mysql.default_socket in php.ini, or with mysql_connect() or mysql_connect("localhost:/path/to/socket"). It was working till PHP 4.1.2. I have checked the phpinfo() and seen that the php.ini was indeed loaded. (Some options are actually tweaked.) I have also checked that the webserver user (nobody) has indeed the previledge to read from/write to that socket file. I can su as nobody and connect to the local mysql server via the socket file (I use skip-networking) with the console mysql client. No password is required for nobody. I have also checked the mysql log file and see no log record on this. The error message I obtained from PHP is: Warning: Can't connect to MySQL server on 'localhost' (111) in /local/home/imacat/public_html/test.php on line 26 Warning: MySQL Connection Failed: Can't connect to MySQL server on 'localhost' (111) in /local/home/imacat/public_html/test.php on line 26 But, if I connect via TCP/IP (comment out skip-networking), everything goes fine. I can't go any further except recompile and debugging the PHP source code, but it's not possible, since it is on a slow development server. I wish this above infomation could be helpful, or at least someone could tell me where I went wrong, that I could connect in the past but cannot connect now. -- Edit bug report at http://bugs.php.net/?id=16821&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=16821&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=16821&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=16821&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=16821&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=16821&r=support Expected behavior: http://bugs.php.net/fix.php?id=16821&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=16821&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=16821&r=submittedtwice