|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-02-24 13:07 UTC] php at andyuhl dot com
The ob_start callback function doesn't seem to get called when the script runs long. To reproduce:
<?php
function callback($buffer) {
return "callback function executed successfully.";
}
set_time_limit(5);
ob_start("callback");
while (1) {
// do nothing
}
ob_end_flush();
?>
This results in empty output for me. You can see my environment here: http://www.andyuhl.com/phpinfo.php
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 16:00:01 2025 UTC |
This is still a bug! Here's a modification of my example code that includes a line which fills the buffer before the script timeout occurs. It still does not return the new buffer properly. <?php function callback($buffer) { return "callback function executed successfully."; } set_time_limit(5); ob_start("callback"); while (1) { echo "This is output.<br>\n"; // create some output this time } ob_end_flush(); ?>