#22401 [Bgs->Opn]: ob_start callback function isn't called when script exceeds max_execution_time

From: Date: Thu, 24 Apr 2003 18:53:40 +0000
Subject: #22401 [Bgs->Opn]: ob_start callback function isn't called when script exceeds max_execution_time
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38332@lists.php.net to get a copy of this message
ID: 22401 User updated by: php at andyuhl dot com Reported By: php at andyuhl dot com -Status: Bogus +Status: Open Bug Type: Output Control Operating System: Win2K PHP Version: 4.3.0 New Comment: 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(); ?> Previous Comments: ------------------------------------------------------------------------ [2003-04-23 17:36:14] helly@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php You did not start any output so it is not supposed to be called. The timeout from max_execution timeout is a real timeout that does not allow any further operations besides shutdown or request shutdown. ------------------------------------------------------------------------ [2003-02-26 07:41:54] php at andyuhl dot com The original server running 4.3.0 is using a slightly customized version of php.ini-dist. When I installed the CVS snapshot yesterday, I used php.ini-dist with no changes and was able to reproduce the problem on a second machine. Another thing I discovered is that it seems to work properly if I call ob_gzhandler as the callback function. It only seems to fail when supplying your own function as I did in the example code in my original post. ------------------------------------------------------------------------ [2003-02-26 01:07:39] sniper@php.net Which php.ini are you using? php.ini-dist or php.ini-recommended? Have you made any changes to it? ------------------------------------------------------------------------ [2003-02-25 09:32:46] php at andyuhl dot com Problem still occurs with latest snapshot. It should be noted that not only does the replaced output not appear, but the original output containing the timeout error message and whatever your original output should be also does not appear. It is simply empty. I tested this on a different machine as I am not able to upgrade the original machine at this time. This machine is WinXP instead of Win2K and it is now running the latest snapshot. ------------------------------------------------------------------------ [2003-02-25 02:20:50] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Can not reproduce using latest CVS snapshot.. ------------------------------------------------------------------------ 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/22401 -- Edit this bug report at http://bugs.php.net/?id=22401&edit=1

« previous php.bugs (#38332) next »