Bug #14542 [Com]: register_shutdown_function() timeout problem
| From: | Jamesjerseys at 126 dot com | Date: | Mon, 29 Aug 2011 08:22:42 +0000 |
| Subject: | Bug #14542 [Com]: register_shutdown_function() timeout problem | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-163059@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=14542&edit=1
ID: 14542
Comment by: Jamesjerseys at 126 dot com
Reported by: dward at maidencreek dot com
Summary: register_shutdown_function() timeout problem
Status: Closed
Type: Bug
Package: Scripting Engine problem
Operating System: Linux 2.4.5
PHP Version: 4.3.0
Block user comment: N
Private report: N
New Comment:
http://www.shopnflapparel.com/nnamdi-asomugha-jersey-c-184_251_1426.html Nnamdi
Asomugha Jersey
http://www.shopnflapparel.com/dominique-rodgerscromartie-jersey-c-184_185_2131.html Dominique
Rodgers-Cromartie Jersey
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
https://bugs.php.net/bug.php?id=14542
--
Edit this bug report at https://bugs.php.net/bug.php?id=14542&edit=1