ID: 40032 Updated by: [EMAIL PROTECTED] Reported By: federico at galassi dot net -Status: Open +Status: Bogus Bug Type: MySQL related Operating System: Gentoo linux PHP Version: 5.2.0 New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. The attempt to re-connect is done by MySQL's ping() command, PHP has not influence on whether it works or not. More over, the MySQL docs indicate that re-connection is not guaranteed, it will merely attempt to do it. Previous Comments: ------------------------------------------------------------------------ [2007-01-05 14:28:32] federico at galassi dot net Description: ------------ When mysql server closes the connection, for example because of wait_timeout configuration parameter, mysql_ping always returns false and never reconnects to mysql. Using the link gives "MySQL server has gone away" error. Reproduce code: --------------- /* set wait_timeout = 10 and restart mysql then run this php script */ $db = mysql_connect(...); // succeeds sleep(15); while (!mysql_ping($db)) { echo "ping failed\n"; } echo "connected\n"; mysql_close($db); Expected result: ---------------- loop ends and script prints "connected\n" Actual result: -------------- loop never ends ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40032&edit=1
