#21513 [Com]: shutdown functions not executed if timed out
| From: | prac1 at dynawest dot cz | Date: | Mon, 24 Mar 2003 23:18:23 +0000 |
| Subject: | #21513 [Com]: shutdown functions not executed if timed out | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-36336@lists.php.net to get a copy of this message | ||
ID: 21513
Comment by: prac1 at dynawest dot cz
Reported By: ceeam at mail dot ru
Status: Verified
Bug Type: Scripting Engine problem
Operating System: windows (only)
PHP Version: 4.3.0
New Comment:
I have Win2000 SP2, Apache 1.3.27, PHP 4.2.2 and 4.3.0, and using this
the problem appears too.
Previous Comments:
------------------------------------------------------------------------
[2003-02-02 15:33:25] k.schroeder@php.net
tests/func/005a.phpt also failed with latestest win32 snap on W2k
server.
------------------------------------------------------------------------
[2003-01-22 22:44:36] sniper@php.net
I can not reproduce this with PHP CGI/CLI/Apache DSO,
but Steph tested the script under windows and
got the same results as ceeam@mail.ru did so this is
definately a windows-only bug.
------------------------------------------------------------------------
[2003-01-22 02:09:49] ceeam at mail dot ru
sniper@php.net:
> This script works just fine for me (using CLI):
> [skipped]
I tested your script. The output is:
PHP Fatal error: Maximum execution time of 1 second exceeded in
c:\exp.php on line 16
PHP Fatal error: Maximum execution time of 1 second exceeded in
c:\exp.php on line 7
"test.log" contains only one "Start" line.
I tried with both my own (pretty much cleaned up) php.ini and
"recommended" php.ini.
I suspect it is only Windows-related problem.
------------------------------------------------------------------------
[2003-01-20 22:47:06] sniper@php.net
And this is related to http://bugs.php.net/bug.php?id=14542
(and maybe to http://bugs.php.net/bug.php?id=14251 ?)
------------------------------------------------------------------------
[2003-01-20 22:44:38] sniper@php.net
This script works just fine for me (using CLI):
<?php
error_log ("Start\n", 3, "test.log");
function boo()
{
error_log ("Shutdown - function 'foo'\n", 3, "test.log");
}
register_shutdown_function("boo");
/* not necessary, just to show the error sooner */
set_time_limit(1);
/* infinite loop to simulate long processing */
for (;;) {}
error_log ("\nEnd\n", 3, "test.log");
?>
In test.log I have now:
----cut----
Start
Shutdown - function 'foo'
----cut----
Which is the expected output.
Can you try this script?
------------------------------------------------------------------------
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/21513
--
Edit this bug report at http://bugs.php.net/?id=21513&edit=1