Apache SAPI screwed up
| From: | Andreas Karajannis | Date: | Sat, 08 Jul 2000 15:16:54 +0000 |
| Subject: | Apache SAPI screwed up | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-23866@lists.php.net to get a copy of this message | ||
Hi all,
after some experiments I've made I believe that the apache SAPI module
needs some rewrite.
This is surely due to apache's weird module initialization api,
nevertheless PHP's module initialization / cleanup is also screwed up
which seems to lead to problems with certain modules.
The MINIT/MSHUTDOWN routines only get called for the main apache
process, but due to the apache way of doing things, twice (At least
under Unix).
I think this is the cause for problems with persistent database
connections that don't get closed properly on child exit, since the
MSHUTDOWN function is not called in this situation - see e.g. Bug #5474.
IMHO at least the the MSHUTDOWN functions should be additionally hooked
to apache's childexit handlers.
The MINIT handlers could be hooked to childinit, but I don't see a need
for this.
Additionally, GSHUTDOWN handlers should be called after MSHUTDOWN in the
main process, right now, they don't get called at all.
There is no easy way to avoid the two rounds of module
initialization/shutdown on apache startup except by using EAPI, but I
see this as a more "cosmetical" issue.
The cleanest approach would be to have GINIT/GSHUTDOWN called only in
the main apache process and the MINIT/MSHUTDOWN in every child process,
but this could cause undesireable side effects.
-Andreas