|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-05-15 18:51 UTC] sniper@php.net
[2003-05-16 08:40 UTC] sthomas at townnews dot com
[2003-05-30 14:39 UTC] georg@php.net
[2003-11-29 10:23 UTC] chris dot noden at monstermob dot com
[2021-04-06 10:40 UTC] git@php.net
[2021-04-06 10:40 UTC] git@php.net
-Status: Not a bug
+Status: Closed
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 23:00:02 2025 UTC |
To reproduce, simply run this script from the PHP CLI: <?PHP print "This is before the fork!\n"; mysql_connect('remote.host', 'user', 'pass'); mysql_select_db('database'); print "Query 1:"; mysql_query('select 1'); print mysql_error(); print "\n"; if (pcntl_fork()) exit(); print "Query 2:"; mysql_query('select 1'); print mysql_error(); print "\n"; mysql_close(); ?> This will almost always produce a "Lost connection to MySQL server during query" error for the second query. Though I did notice that it seems to happen only if the host is a remote host. We are using PHP 4.0.12 as the server, and this bug seems to occour whether we use the included mysql client libraries or compile against the 4.0.12 libraries.