|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-05-31 11:40 UTC] tony2001@php.net
[2007-05-31 11:44 UTC] gopalv@php.net
[2007-06-01 10:04 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 15:00:01 2025 UTC |
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.