From: dgrimes at scvl dot com
Operating system: SCO OpenServer
PHP version: 4.4.1
PHP Bug Type: MySQL related
Bug description: Can't connect to local MySQL server through socket
Description:
------------
I am having random failure on making a connection to MySQL. This the code
used to make the connection and has been for several years.
if (!$this->linkid = mysql_connect($this->host,$this->user,$this->pass))
DBError(mysql_errno(),mysql_error(),"LINKID-$db",$this->mailerr,$this->sendto);
The following error is returned randomly however it happens usually right
after starting apache or after a period of inactivity:
2002 - Can't connect to local MySQL server through socket
'/d/mysql/var/mysql.so
ck' (-2146870980)
Starting with version PHP 4.3.0 is when the problem started. Version 4.2.x
does not have this problem. I compiled every version until I found where
the problem started. I am currently trying to move from 4.0.6 to 4.4.1 but
need to get this issue addressed.
My system:
SCO OpenServer 5.0.4 and 5.0.6
MySQL 4.1.15
Apache 1.3.34
Reproduce code:
---------------
if (!$this->linkid = mysql_connect($this->host,$this->user,$this->pass))
DBError(mysql_errno(),mysql_error(),"$this->linkid
LINKID-$db",$this->m
ailerr,$this->sendto);
Expected result:
----------------
I expected to get a resource ID returned.
Actual result:
--------------
2002 - Can't connect to local MySQL server through socket
'/d/mysql/var/mysql.so
ck' (-2146870980)
--
Edit bug report at http://bugs.php.net/?id=35292&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35292&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=35292&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=35292&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35292&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35292&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35292&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35292&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35292&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35292&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35292&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=35292&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=35292&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35292&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35292&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35292&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35292&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35292&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35292&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35292&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35292&r=mysqlcfg