#36081 [Opn->Bgs]: PHP Script continues to run after user hits "stop"
| From: | sniper@php.net | Date: | Sat, 21 Jan 2006 00:56:17 +0000 |
| Subject: | #36081 [Opn->Bgs]: PHP Script continues to run after user hits "stop" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-92326@lists.php.net to get a copy of this message | ||
ID: 36081
Updated by: sniper@php.net
Reported By: bashusr at gmail dot com
-Status: Open
+Status: Bogus
Bug Type: IIS related
Operating System: Windows 2003
PHP Version: 4.4.2
New Comment:
Yes, Apache is also very easy to install on Windows.
You can get it from http://httpd.apache.org/
It's not only much better webserver than IIS, it actually works. :)
Previous Comments:
------------------------------------------------------------------------
[2006-01-21 00:12:47] bashusr at gmail dot com
apache on windows? I do not have apache and do not have the ability to
install it on this server. I know when I run similar scripts on apache
under linux, I have no problems.
------------------------------------------------------------------------
[2006-01-20 15:56:05] sniper@php.net
Does it happen with Apache? (try it if you haven't done so yet)
------------------------------------------------------------------------
[2006-01-20 14:50:20] bashusr at gmail dot com
I get a lot of "hey"'s, then click "stop" on the browser and the script
is still running in the background taking up 100% cpu and making
temp.txt 10 MB large.
------------------------------------------------------------------------
[2006-01-20 14:45:58] tony2001@php.net
Does this code work for you?
<?php
$handler=fopen("tmp.txt","w");
while(true) {
echo "hey";
fwrite($handler, "Hey\n");
}
?>
------------------------------------------------------------------------
[2006-01-20 14:25:38] bashusr at gmail dot com
I wrote a test script just for this purpose:
<?php
echo "hey";
$handler=fopen("tmp.txt","w");
while(true) {
fwrite($handler, "Hey\n");
}
?>
The echo _should_ be enough to display data for connections aborted. In
any case, i hit the "stop" button... and the script continues to run
taking 100% cpu time and the tmp.txt grows indefinitely.
In case it is of any use, I am on windows 2003 using php through ISAPI.
------------------------------------------------------------------------
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/36081
--
Edit this bug report at http://bugs.php.net/?id=36081&edit=1