ID: 39330 Updated by: [EMAIL PROTECTED] Reported By: isk at ecommerce dot com -Status: Assigned +Status: Closed Bug Type: Apache2 related Operating System: Linux PHP Version: 5.1.6 Assigned To: tony2001 New Comment:
This bug has been fixed in CVS. 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/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2007-05-31 11:44:04] [EMAIL PROTECTED] Bug confirmed and patch does work as said. ------------------------------------------------------------------------ [2007-05-31 11:40:57] [EMAIL PROTECTED] I'll commit the patch after 5.2.3 release. ------------------------------------------------------------------------ [2006-11-01 13:16:08] isk at ecommerce dot com Description: ------------ apache2handler sapi registers cleanup functions only for main apache process. php_apache_server_startup(){ ... apr_pool_cleanup_register(pconf, NULL, php_apache_server_shutdown, apr_pool_cleanup_null); ... } The pconf is main apache process pool. But apache 2 cleans _only_ child pool before it die. apache2handler must register cleanup function and for child pool. This can be fixed by several strings. sapi/apache2handler/sapi_apache2.c: static void php_apache_child_init(apr_pool_t *pchild, server_rec *s) { apr_pool_cleanup_register(pchild, NULL, php_apache_server_shutdown, apr_pool_cleanup_null); } void php_ap2_register_hook(apr_pool_t *p) { ... ap_hook_child_init(php_apache_child_init, NULL, NULL, APR_HOOK_MIDDLE); } Without this code the using persistent connection has problem in unclean close connection to DB after apache child die. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39330&edit=1