|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-01-05 15:28 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 23:00:02 2025 UTC |
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