|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-04-25 06:28 UTC] imacat at mail dot imacat dot idv dot tw
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.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 30 13:00:01 2025 UTC |
Thank you. ^_*' But I don't think so. I did have searched the bug database and read several reports. I even searched on the google. But I did not find this same bug report on PHP 4.2.0. Yes, I did find 2 same bug reports on PHP 4.0.5 and PHP 4.0.6. I thought they were different problems, though, since they apply to PHP 4.0.x, and since it works on PHP 4.1.x. I did not test this on PHP 4.0.x, since I start using mysql local socket file and "skip-networking" on PHP 4.1.x. You can ignore this. But if you have time, maybe you can tell me which 2 previous bug reports (bug no#) I have missed. I don't like the feeling of asking duplicated questions and wasting network resources, without knowing why. Sorry for this, and thank you for reading. I'm waiting for PHP 4.2.1 now.