#14542 [Com]: register_shutdown_function() timeout problem
| From: | jason at thinkingman dot org | Date: | Tue, 27 Jan 2004 02:49:30 +0000 |
| Subject: | #14542 [Com]: register_shutdown_function() timeout problem | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-53940@lists.php.net to get a copy of this message | ||
ID: 14542
Comment by: jason at thinkingman dot org
Reported By: dward at maidencreek dot com
Status: Closed
Bug Type: Scripting Engine problem
Operating System: Linux 2.4.5
PHP Version: 4.3.0
New Comment:
Problem STILL occurs in 4.3.3 release under Win32.
Previous Comments:
------------------------------------------------------------------------
[2003-06-16 14:04:52] jason at thinkingman dot org
My BUG REPORT [marked BOGUS] contains important notes:
http://bugs.php.net/bug.php?id=17461
------------------------------------------------------------------------
[2003-06-16 14:02:36] jason at thinkingman dot org
I concur -- this has NOT been fixed for Win32. Please (someone) fix.
Need to be able to handle timeouts correctly.
I used the following code under PHP 4.3.2
<?
set_time_limit(1);
function test() {
echo connection_status();
echo "Processing timeout - line1\n";
echo "Processing timeout - line2\n";
}
register_shutdown_function('test');
while(1);
?>
------------------------------------------------------------------------
[2003-06-15 16:54:23] sergio at libero dot it
This bug has been not fixed on win32.
I've tried to execute this script
<?PHP
set_time_limit(1);
register_shutdown_function("shutdown");
function shutdown(){
$status = connection_status();
$err = "Connection status ($status).\n";
error_log($err, 3, "/temp/phpstatus.log");
}
while(true){
echo ".";
}
?>
PHP says:
Fatal error: Maximum execution time of 1 second exceeded in
C:\Inetpub\wwwroot\php\mynewsgate\shutdown.php on line 11
Fatal error: Maximum execution time of 1 second exceeded in
C:\Inetpub\wwwroot\php\mynewsgate\shutdown.php on line 6
I've used PHP 4.3.2 on windows xp
------------------------------------------------------------------------
[2003-01-22 23:17:05] sniper@php.net
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2002-04-25 16:07:25] charmaine dot tian at contec-innovations dot com
The cause of the bug is that the following code is commented out in the
timeout handler (zend_timeout() in zend_execute_API):
/* is there any point in this? we're terminating the request
anyway...
PG(connection_status) |= PHP_CONNECTION_TIMEOUT;
*/
In our case, we need this error status to be set correctly. We want to
be able to detect the error when a script is terminated due to timeout.
------------------------------------------------------------------------
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/14542
--
Edit this bug report at http://bugs.php.net/?id=14542&edit=1