On 20/04/07, Joe Lewis <[EMAIL PROTECTED]> wrote:
Michael B Allen wrote:
> Hi Saju,
>
> Actually I'm not sure this is my problem. I have tested my PHP extension
> on numerous platforms and I have only ever seen the PHP extension
> initialization / deinitialization routines run once for each restart.
>
> Is the "load -> unload -> load" behavior you describe something new that
> Apache just started doing?
>

Apache has been doing that for eons. But apache does it to the apache
extensions, while PHP would do it to the PHP extensions. I really expect
that you should be working with the PHP lists rather than here from the
original posting. (See http://www.php.net/mailing-lists.php for one that
might fit your needs).

Saju is absolutely correct - when a module is loaded by apache, a hook
called post_config() is called twice (for checking the config file first
that the syntax is okay, and then for the actual configuration), but I'm
not sure if the .so is free()d from memory during that process. I always
thought that it did not actually reload the .so (correct me if I am wrong).


mod_so loads a module using apr_dso_load() . This call registers a
pool cleanup callback that is called during config pool clearing to
unload the dso.

Without all modules getting unloaded in a restart cycle, you would not
be able to get rid of a module across restarts by commenting out it's
LoadModule.

-srp

Forcing an extension to "deinitialize" in PHP because of an issue in
Apache would cause every extension in PHP to "deinitialize", not just
one of them. I expect the issue to be in the php extension itself (or
php, but that is unlikely).

Joe
--
Joseph Lewis <http://sharktooth.org/>
"Divide the fire, and you will sooner put it out." - Publius Syrus

Reply via email to