|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-01-19 12:20 UTC] bashusr at gmail dot com
Description: ------------ When running a large script, php does not stop execution even after the stop button and the connection to the server is terminated. Expected result: ---------------- PHP should stop when the "stop" button is pushed to save valuable resources... PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 28 22:00:01 2025 UTC |
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.Does this code work for you? <?php $handler=fopen("tmp.txt","w"); while(true) { echo "hey"; fwrite($handler, "Hey\n"); } ?>Ok... I took Philip's advice from irc://irc.freenode.net/##php and actually ran the simple while(true) {} script in apache2 with the latest php snapshot... Same results, except apache2 seemed to respect the 30 second execution limits... This isn?t just an IIS bug if it makes anyone more inclined to fix it.