ID: 17774 Comment by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Bogus Bug Type: Scripting Engine problem Operating System: FREEBSD 4.7-STABLE PHP Version: PHP/4.3.0RC3 New Comment:
It's glad to meet the person who's suffering with same bug. I have two sample codes that isn't run correctly. First one: <? ignore_user_abort (true); set_time_limit (0); for($i = 1; $i < 100; $i++) { $fp = fopen("conntest.out", "wt"); fputs ($fp, $i.":".connection_aborted()."\n"); echo "\n"; flush (); fclose($fp); sleep(1); } ?> It's supposed to stop at xx:0 when user press STOP button of browser, but it isn't. The number is continued until 100. Second one: <?php function bye () { $fp = fopen ("./result.txt", "w"); fwrite ($fp, "BYE CALLED AT ".date("YmdHi",time())."\r\n"); fwrite ($fp, connection_aborted ()); fclose ($fp); die(); } register_shutdown_function ('bye'); set_time_limit ( 0 ); ignore_user_abort (true); $fp = fopen ("./result.txt", "w"); while (!connection_aborted()) { echo "\n"; flush (); sleep ( 1 ); } ?> Registered Shutdown function won't work! Neither of them worked correctly. Apache 1.3.27 + PHP 4.3.0, Win32 / FreeBSD 4.6 PHP is running as a dynamic module for Apache. Previous Comments: ------------------------------------------------------------------------ [2002-12-13 04:05:31] [EMAIL PROTECTED] ignore that, its working now, but it wasnt a minute ago. ------------------------------------------------------------------------ [2002-12-13 04:04:08] [EMAIL PROTECTED] Okay, so we got the problem down to apache 2.x. ANyway, I got time to install apache 1.3.27. Now my system is running this :- SERVER_SOFTWARE Apache/1.3.27 (Unix) PHP/4.3.0RC3 And the problem still exists. I run the exact same script as shown above, which yourselfs have verified should return a '1'. The script is returning a 0, even if I press the STOP button. I have not bothered to compile gzip into this apache installation, to ensure it is not that which causes a problem. http://admin.mghost.net/~neil/test/ - script http://admin.mghost.net/~neil/test/output.txt - output file http://admin.mghost.net/~neil/test/test.cgi - standard perl diver script, to show details of my server. ------------------------------------------------------------------------ [2002-12-08 17:01:42] [EMAIL PROTECTED] This may interest you :- http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8996 Obviously if apaches log files are doing htat, then its completely the fault of apache 2 :-/ ------------------------------------------------------------------------ [2002-12-08 10:46:28] [EMAIL PROTECTED] This report describes another problem: http://bugs.php.net/bug.php?id=14542 So there is clearly some bug in there. But for aborts it definately works (on apache1) so you should report this to apache folks too, would be nice to hear what they think of it.. :) ------------------------------------------------------------------------ [2002-12-08 08:23:31] [EMAIL PROTECTED] Okay, I should report this to Apache then ? This is a fault in there software ? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/17774 -- Edit this bug report at http://bugs.php.net/?id=17774&edit=1