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

From: Date: Wed, 23 Apr 2003 22:36:15 +0000
Subject: #22401 [Opn->Bgs]: 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-38237@lists.php.net to get a copy of this message
 ID:               22401
 Updated by:       helly@php.net
 Reported By:      php at andyuhl dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Output Control
 Operating System: Win2K
 PHP Version:      4.3.0
 New Comment:

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.


Previous Comments:
------------------------------------------------------------------------

[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..


------------------------------------------------------------------------

[2003-02-24 13:07:56] 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

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=22401&edit=1



Thread (13 messages)

« previous php.bugs (#38237) next »