From: phpbug at zone-mr dot ath dot cx
Operating system: Windows 2004 Server
PHP version: 5.0.2
PHP Bug Type: IIS related
Bug description: connection_status and connection_aborted not working.
Description:
------------
I have seen similar bug reports for Apache2 (where the issue is still
unresolved, but none for IIS 6.0).
I have tried two different servers, and both PHP 5.02 and PHP4.39. Each
server was running Windows 2003 with IIS 6 and exhibits the same
symptons.
Connection_status reports 0, even when the stop button is pressed, and
there is no browser listening to the script output. Connection_abort also
returns false.
Reproduce code:
---------------
ignore_user_abort(???); //Tried both true and false, no difference
while (connection_status()==0) {
sleep(1);
echo "test\n";
flush();
ob_flush();
... //Log an "I'm still here" timestamp, for debugging
if(connection_aborted()) {
//Log a disconnection into a DB
exit;
}
}
//Log a disconnection into a DB
Expected result:
----------------
When the browser window or connection is closed, I expect the script to
stop logging the "I'm still there" message every second, and terminate
execution.
Actual result:
--------------
The script continues to run, updating the timestamp every second, until
the time limit is reached. Connection_aborted, connection_status seem to
indicate the connection is still active (but it isn't - the browser is
closed, netstat confirms that there are no connections).
--
Edit bug report at http://bugs.php.net/?id=30301&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30301&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30301&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30301&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30301&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30301&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30301&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30301&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30301&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30301&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30301&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30301&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30301&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30301&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30301&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30301&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30301&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30301&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30301&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30301&r=mysqlcfg