PHP 4.0 Bug #6058 Updated: Processes not dying

From: Date: Thu, 07 Dec 2000 16:27:40 +0000
Subject: PHP 4.0 Bug #6058 Updated: Processes not dying
Groups: php.dev 
Request: Send a blank email to php-dev+get-40407@lists.php.net to get a copy of this message
ID: 6058 Updated by: sniper Reported By: mstelzer@ea.com Status: Closed Bug Type: MSSQL related Assigned To: Comments: No feedback. Previous Comments: --------------------------------------------------------------------------- [2000-11-01 11:11:27] sniper@php.net 1. Shorten you example scripts to minimum. 2. Try php4.0.3pl1 or php4.0.4-dev from http://php4win.de --Jani --------------------------------------------------------------------------- [2000-08-10 01:48:45] mstelzer@ea.com Here's small script that allows to machine to post stats from a game to a database with verification (keep reading...): [SOME PASSWORD INFO REMOVED] <? mssql_connect("", "", ""); // Client: just insert the stats into the pending table if ($host == 0) { mssql_query("insert into pending_halfinnings(gid, inning, team, runs) values('$gid', '$inning', '$team', '$runs')"); } // Host: wait for client's data to be entered, validate it, move it to the halfinnings table else { $num = 0; $starttime = time(); while ($num == 0) { $result = mssql_query("select runs from pending_halfinnings where gid='$gid' and inning='$inning' and team='$team'"); $num = mssql_num_rows($result); // Timeout after 60 seconds of waiting for the client's post if ((time() - $starttime) >= 60) break; } mssql_query("delete from pending_halfinnings where gid='$gid'"); $arr = mssql_fetch_row($result); if ($runs == $arr[0]) mssql_query("insert into halfinnings (gid, inning, team, runs) values('$gid', '$inning', '$team', '$runs')"); } ?> Now the queries get more complicated... <? mssql_connect("slammer", "tripleplay", "easd"); // Client: just insert the stats into the pending table if ($host == 0) { mssql_query("insert into pending_pogs(gid, pog, singles, doubles, triples, homeruns, rbis, stolenbases, runsscored, wins, saves, complete, nohitter, strikeouts) values('$gid', '$pog', '$singles', '$doubles', '$triples', '$homeruns', '$rbis', '$stolenbases', '$runsscored', '$wins', '$saves', '$complete', '$nohitter', '$strikeouts')"); } // Host: wait for client's data to be entered, validate it, move it to the halfinnings table else { $num = 0; $starttime = time(); while ($num == 0) { $result = mssql_query("select * from pending_pogs where gid='$gid'"); $num = mssql_num_rows($result); // Timeout after 60 seconds of waiting for the client's post if ((time() - $starttime) >= 60) break; } mssql_query("delete from pending_pogs where gid='$gid'"); $arr = mssql_fetch_row($result); if (($arr[1] == $pog) && ($arr[2] == $singles) && ($arr[3] == $doubles) && ($arr[4] == $triples) && ($arr[5] == $homeruns) && ($arr[6] == $rbis) && ($arr[7] == $stolenbases) && ($arr[8] == $runsscored) && ($arr[9] == $wins) && ($arr[10] == $saves) && ($arr[11] == $complete) && ($arr[12] == $nohitter) && ($arr[13] == $strikeouts)) { mssql_query("insert into pogs (gid, pog, singles, doubles, triples, homeruns, rbis, stolenbases, runsscored, wins, saves, complete, nohitter, strikeouts) values('$gid', '$pog', '$singles', '$doubles', '$triples', '$homeruns', '$rbis', '$stolenbases', '$runsscored', '$wins', '$saves', '$complete', '$nohitter', '$strikeouts')"); } } ?> In this second script when the main if...else statement goes into the ELSE, the script executes completely, but the php.exe process fails to die. Once 10 of these processes build up, PHP stops responding. This is on PHP4 pl2 with MSSQL 7.0 The first script runs fine, only the more complex second script does this. Please let me know what you can about this problem. Thanks, Matt Stelzer Software Engineer Electronic Arts mstelzer@ea.com --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=6058

« previous php.dev (#40407) next »