From: xufei_ok at 126 dot com
Operating system: redhat linux 2.6.18-8.el5
PHP version: 5.2.6
PHP Bug Type: Apache2 related
Bug description: the function PHP_MSHUTDOWN_FUNCTION was called by every
process of apache but
Description:
------------
In the php extension moduld the function PHP_MSHUTDOWN_FUNCTION was called
by every process of apache while PHP_MINIT_FUNCTION only was called one
time by the parent process of apache.
It cause the whold module only was initialized one times but was
finalized several times.
Reproduce code:
---------------
PHP_MINIT_FUNCTION(zraidapi)
{
/* If you have INI entries, uncomment these lines
REGISTER_INI_ENTRIES();
*/
ZA_DBG_Init( "" );
if( FALSE == zRaidApiInit() ) // 0 - SILENT_MODE, 1 - BUZZER_MODE
{
zend_error( E_ERROR, "zRaidApiInit() failed!!" );
return FAILURE;
}
STORE_KEY(PHP_ZRAIDAPI, 1, 0, 0, 18);
return SUCCESS;
}
PHP_MSHUTDOWN_FUNCTION(zraidapi)
{
/* uncomment this line if you have INI entries
UNREGISTER_INI_ENTRIES();
*/
zRaidApiShutdown();
ZA_DBG_Shutdown();
return SUCCESS;
}
Expected result:
----------------
I want to get some explaination about when the PHP_MINIT_FUNCTION and
PHP_MSHUTDOWN_FUNCTION were called , and whether it is a bug of php or
apache2.
--
Edit bug report at http://bugs.php.net/?id=45481&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=45481&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=45481&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=45481&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=45481&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=45481&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=45481&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=45481&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=45481&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=45481&r=support
Expected behavior: http://bugs.php.net/fix.php?id=45481&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=45481&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=45481&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=45481&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=45481&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=45481&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=45481&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=45481&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=45481&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=45481&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=45481&r=mysqlcfg