From: corinl at gmx dot de Operating system: linux debian PHP version: 5.0.4 PHP Bug Type: MySQLi related Bug description: lost connection error on non-standart (<>3306) port
Description: ------------ using mysqli with a non-standart port, like 3307, it looses the database connection. i'm not sure if this happens only when using multiple instances of mysqli. the mysql server is fine, it must be a php problem/bug!! Reproduce code: --------------- $a = new mysqli('127.0.0.1','test1','abc','test1',3307); if (mysqli_connect_errno()) die("connect: failed with '".mysqli_connect_error()."'!"); printf("Host information: %s\n", $a->host_info); $r = $a->query('SHOW TABLES'); while ($v=$r->fetch_assoc()) print_r($v); $b = new mysqli('127.0.0.1','test2','abc','test2',3307); if (mysqli_connect_errno()) die("connect: failed with '".mysqli_connect_error()."'!"); printf("Host information: %s\n", $b->host_info); $r = $b->query('SHOW TABLES'); while ($v=$r->fetch_assoc()) print_r($v); -- $a = new mysqli('127.0.0.1','test1','abc','test1',3306); if (mysqli_connect_errno()) die("connect: failed with '".mysqli_connect_error()."'!"); printf("Host information: %s\n", $a->host_info); $r = $a->query('SHOW TABLES'); while ($v=$r->fetch_assoc()) print_r($v); $b = new mysqli('127.0.0.1','test2','abc','test2',3306); if (mysqli_connect_errno()) die("connect: failed with '".mysqli_connect_error()."'!"); printf("Host information: %s\n", $b->host_info); $r = $b->query('SHOW TABLES'); while ($v=$r->fetch_assoc()) print_r($v); Expected result: ---------------- in both cases something like Host information: 127.0.0.1 via TCP/IP Array (...) Host information: 127.0.0.1 via TCP/IP Array (...) Actual result: -------------- Warning: mysqli::mysqli() [function.mysqli]: Lost connection to MySQL server during query in /test/mysqli.php on line 2 connect: failed with 'Lost connection to MySQL server during query'! -- Edit bug report at http://bugs.php.net/?id=32898&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32898&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32898&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32898&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32898&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32898&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32898&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32898&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32898&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32898&r=support Expected behavior: http://bugs.php.net/fix.php?id=32898&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32898&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32898&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32898&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32898&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32898&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32898&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32898&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32898&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32898&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32898&r=mysqlcfg