ID: 16821 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Duplicate Bug Type: MySQL related Operating System: Linux 2.2.17/2.4.8 PHP Version: 4.2.0 New Comment:
You are the third :) But thinks for this thourough report. It will be fixed in 4.2.1. Derick Previous Comments: ------------------------------------------------------------------------ [2002-04-25 06:28:53] [EMAIL PROTECTED] 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 this bug report at http://bugs.php.net/?id=16821&edit=1