RE: [PHP] Interesting timeout issue
| From: | Ben Vaughn | Date: | Thu, 09 Jan 2003 20:54:55 +0000 |
| Subject: | RE: [PHP] Interesting timeout issue | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-131004@lists.php.net to get a copy of this message | ||
Running my code directly from console (/usr/local/bin/php ./code.php)
allows the code to complete properly. It must be an HTTP issue.
Cheers,
Ben
------
Ben Vaughn
Security Analyst
Blackbird Technologies
703-796-1438 W / 703-868-5258 C
bvaughn@blackbirdtech.com
------
-----Original Message-----
From: Ben Vaughn
Sent: Thursday, January 09, 2003 12:25 PM
To: php-general@lists.php.net
Subject: [PHP] Interesting timeout issue
Hello,
I just recently upgraded from 4.2.3 to 4.3.0 and a script of
mine has begun behaving erratically. The code is included at the bottom
of this message. I am essentially updating a large (1.94m row) table to
include a new field...the queries needed to do this updating are
somewhat time consuming, so I have been updating all of this for about
fifteen months now. However, since my 4.3.0 upgrade, this script can
get through maybe 110 lines before halting. I get no errors posted with
regards to the script, and no HTTP errors or timeout messages, it's as
if the script thinks it's completed. If anyone could give me a clue-in
as to what's up, I would be much obliged.
Cheers,
Ben
<?php
include("functions.inc.php");
$db = mysql_connect("localhost", "user", "pw");
mysql_select_db("db", $db);
$sql = "SELECT ID,a FROM b.c WHERE d = '' LIMIT 200;";
$result = mysql_query($sql);
$numrows = mysql_num_rows($result);
echo "Performing op on $numrows rows<br>";
$qstart = sn_Msecs();
while ($row = mysql_fetch_row($result)) {
$owner = getcache($row[1]);
$id = $row[0];
$sqlu = "UPDATE b.c SET d = '$owner' WHERE ID = '$id';";
$resultu = mysql_query($sqlu);
}
$qstop = sn_Msecs();
$qtime = round($qstop-$qstart,2);
echo "the update took $qtime secs";
?>
------
Ben Vaughn
Security Analyst
Blackbird Technologies
703-796-1438 W / 703-868-5258 C
bvaughn@blackbirdtech.com
------
Attachment: [text/x-vcard] Benjamin I Vaughn (Ben Vaughn).vcf
Attachment: [application/x-pkcs7-signature] smime.p7s
Attachment: [text/x-vcard] Benjamin I Vaughn (Ben Vaughn).vcf
Attachment: [application/x-pkcs7-signature] smime.p7s