ID: 32898 Updated by: [EMAIL PROTECTED] Reported By: corinl at gmx dot de -Status: Open +Status: Feedback Bug Type: MySQLi related Operating System: linux debian PHP Version: 5.0.4 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.0-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2005-04-30 12:21:21] corinl at gmx dot de 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 this bug report at http://bugs.php.net/?id=32898&edit=1