Still the problem (bug) with clients gone byebye
| From: | Christopher W. Curtis | Date: | Thu, 10 Dec 1998 06:56:30 +0000 |
| Subject: | Still the problem (bug) with clients gone byebye | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-2734@lists.php.net to get a copy of this message | ||
Pardon my message; it's late and I'm tired and frustrated.
Okay .. here's the deal. This thing simply does not work. However,
there are circumstances under which the script _does_ exit, I just can't
tell what they are.
This is the original script logic:
while( 1 )
query database
print new results
Closing the connection leaves this script running indefinately. Exactly
how long I'm not sure because after a day or two it brings the server to
its knees. Here's my test script:
<?php
while( 1 )
print( "test" );
?>
This runs for about 30-60 seconds after the client closes the
connection, then exits. There is some sort of limit that can be reached
to force an exit, but I can't for the life of me figure it out. I've
also tried this:
$rv = echo();
-- parse error
$rv = print();
-- $rv is always (?) 1. I thought maybe I could get a 0 if the client
was gone, but no such luck. I first used it in my test script and it
did work, but I think now that it was simply timing out, just like the
loop without an exit strategy.
$rv = printf();
-- This is parseable, but $rv is always a null string.
Return values are not discussed in the online manual, and I see now that
the note I added to the print() function is inaccurate. Someone needs
to delete it or modify PHP to act in the manner I described.
Does anyone know what's going with this? Apache sees the error. Does
Apache not tell PHP, or does PHP simply not care? Is there any way to
tell if the client has disconnected?
Somebody ... PLEEZE ... :(
tia,
Chris
--
Oh My God! They Killed init! You Bastards!!
make install; not war
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net