ID:               28195
 Updated by:       [EMAIL PROTECTED]
 Reported By:      wesleygoku at hotmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Unknown/Other Function
 Operating System: Windows 2000 SP4 + Apache 2.0.49
 PHP Version:      4.3.6
 New Comment:

Does it work with apache 1.3.29?


Previous Comments:
------------------------------------------------------------------------

[2004-04-27 23:26:33] wesleygoku at hotmail dot com

Description:
------------
The funcions connection_aborted(), connection_status() and
register_shutdown_function never work well. Using an infinite while
(while (true)) to make my WebChat work, even the user stopping the page
load, the script keep running (even when I set ignore_user_abort(0)).
When I tried to check the connection with these functions, they always
returnet TRUE, or NORMAL, even the register_shutdown_function callback
funcion ISN'T called.

And every bug report of this problem says it was corrected (since
2002), but I'm using it TODAY (with everything updated) and the problem
persists!

I'm using PHP 4.3.6 as an Apache 2.0.49 module.

Reproduce code:
---------------
set_time_limit(0);
ignore_user_abort(0);
register_shutdown_function("chat_quit");

function chat_quit () {
        // some code
        exit;
}

echo "<!-- "; for ($i = 0; $i < 20480; $i++) {echo rand(0, 9); } echo "
-->\n";
flush();

while (true) {
        // Infinite code
}

Expected result:
----------------
When the user hits 'stop', the function 'chat_quit' should be called.
Even if I change 'while (true)' to 'while (!connection_aborted())' the
loop continues.

Actual result:
--------------
The function is NEVER called.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=28195&edit=1

Reply via email to