note 64437 added to function.ob-flush
| From: | ritesh_parekh at datamatics dot com | Date: | Fri, 14 Apr 2006 12:04:32 +0000 |
| Subject: | note 64437 added to function.ob-flush | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-108057@lists.php.net to get a copy of this message | ||
Hi I tried using the same example of continuous output using Apache 2.0.52 and PHP 5.0.3 on Windows
2000. But it creates serious memory issue The Apache Server keeps on hogging memory and also since
it is windows based it keeps opening threads and never releases despite of connection being aborted
by clicking stop button of browser.
continuous.php
<?php
set_time_limit(0);
ignore_user_abort(true);
while (ob_get_level()) {
ob_end_flush();
}
// start output buffering
if (ob_get_length() === false) {
ob_start();
}
//$temp_test="Hello World";
$message = "Hello World.\n";
while (1)
{
echo $message;
@ob_flush();
flush();
usleep(1000);
if (connection_aborted())
{
ob_end_clean();
error_log("Browser closed");
break;
}
}
error_log("Exit Thread");
?>
Is there something wrong i am doing or some more information you want. Please let me know i am
really stuckup with this issue.
----
Server IP: 203.199.124.111
Probable Submitter: 203.129.239.2
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.ob-flush.php
Edit -- http://master.php.net/note/edit/64437
Del: integrated -- http://master.php.net/note/delete/64437/integrated
Del: useless -- http://master.php.net/note/delete/64437/useless
Del: bad code -- http://master.php.net/note/delete/64437/bad+code
Del: spam -- http://master.php.net/note/delete/64437/spam
Del: non-english -- http://master.php.net/note/delete/64437/non-english
Del: in docs -- http://master.php.net/note/delete/64437/in+docs
Del: other reasons-- http://master.php.net/note/delete/64437
Reject -- http://master.php.net/note/reject/64437
Search -- http://master.php.net/manage/user-notes.php