ID: 22401 Updated by: [EMAIL PROTECTED] Reported By: php at andyuhl dot com -Status: Open +Status: Verified Bug Type: Output Control Operating System: win32 only -PHP Version: 4.3.2-dev +PHP Version: 4.3.2-dev, 5.0.0b2-dev New Comment:
Happens only with win32. (works fine in Linux) Previous Comments: ------------------------------------------------------------------------ [2003-04-28 13:22:20] php at andyuhl dot com Well, something isn't working right somewhere because the windows and linux version behave differently. Running the updated code that I just posted, the windows version doesn't return any output at all. It doesn't even return the error message for timing out, which means that it is definitely doing something to that buffer that is built up in the loop. Additionally, the same code on linux behaves as I would expect it to. On linux, it does process the callback function after it times out and it outputs "callback function executed successfully." >From what you've said, now I'm not sure where the bug exists, but with such distinctly different behavior across platforms, I'm fairly certain it exists somewhere. ------------------------------------------------------------------------ [2003-04-26 10:16:51] [EMAIL PROTECTED] Shuffling code around does not change the problem. Still you are timed out and the buffers are ignored (what is correct). What you need is an on_timeout_callback(). ------------------------------------------------------------------------ [2003-04-24 13:53:40] php at andyuhl dot com 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(); ?> ------------------------------------------------------------------------ [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] [EMAIL PROTECTED] Which php.ini are you using? php.ini-dist or php.ini-recommended? Have you made any changes to it? ------------------------------------------------------------------------ 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