From: cagret at gmail dot com
Operating system: Win XP SP3
PHP version: 5.2.9
PHP Bug Type: Unknown/Other Function
Bug description: register_shutdown_function() does not execute after exit()
Description:
------------
Function registered with register_shutdown_function() is not executed
after call to exit() on windows with latest php (php5 - failed, php4 - ok).
On linux it works as expected (both php4 & php5 - ok).
I have tested many configurations, here is the summary:
* Win XP Sp3, Apache/2.2.11 php_mod, php versions: 5.2.9-2, 5.2.6, 5.2.8,
5.2.10RC1, 5.3.0RC2 (all versions FAILED)
* Win XP Sp3, Apache/1.3.34, php_mod, php 4.4.3-dev (OK)
* Linux, Lighttpd, cgi-fcgi, php 5.2.6 (OK)
* Linux, Apache/2.0.52 (CentOS), php_mod, php 4.3.9 (OK)
Reproduce code:
---------------
<?php
function shutdown()
{
file_put_contents(dirname(__FILE__).'/shutdown.txt', time());
}
register_shutdown_function('shutdown');
exit();
?>
--
Edit bug report at http://bugs.php.net/?id=48475&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=48475&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=48475&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=48475&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=48475&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=48475&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=48475&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=48475&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=48475&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=48475&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=48475&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=48475&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=48475&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=48475&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=48475&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48475&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48475&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=48475&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=48475&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=48475&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=48475&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=48475&r=mysqlcfg