ID: 30301 Comment by: daemorhedron at siliconjesters dot com Reported By: phpbug at zone-mr dot ath dot cx Status: Open Bug Type: IIS related Operating System: Windows 2003 Server PHP Version: 5.0.2 New Comment:
fwiw, I notice this exact behaviour as well under completely different specs. Mandrake linux 9.2 Apache 1.3.31 PHP 4.3.8 and 4.3.9 Tried numerous combinations/scripts of ignore_user_abort(), flush(), and use with/without output buffering. Both connection_aborted() and connection_status() always return 0 even when they should be reporting at least 1 (connection aborted). So it seems that this bug isn't restricted to IIS at this time. Haven't tried this on php5 and don't intend to unless aggregation is magically restored. Devs, feel free to contact me by email for further info if required. Previous Comments: ------------------------------------------------------------------------ [2004-10-01 14:27:54] phpbug at zone-mr dot ath dot cx Typo: Windows 2004 Server should of course be Windows 2003 Server ------------------------------------------------------------------------ [2004-10-01 14:25:06] phpbug at zone-mr dot ath dot cx 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 this bug report at http://bugs.php.net/?id=30301&edit=1