You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ben van Klinken <bv...@gmail.com> on 2006/03/11 13:32:19 UTC

[users@httpd] LoadModule - child/parent behaviour

Hi,

I have written a php module that is designed to be run in apache (winnt only
for now) (bear with me, this is apache related). In this module, the
initialisation of the module, it connects to a server immediately (instead
of waiting for the first request to be processed). At first i was using the
ONE_PROCESS directive to only load one process, but later realised i
couldn't do this if i wanted to run apache as a service. But if i run with
the normal parent/child way, then both processes log into the server (which
is unnecessary, and problematic). Does anyone know of any way of
conditionally calling LoadModule so that it is only opened in the child.

Something like this, maybe:

<IfDefined ?IS_CHILD?>
LoadModule php5_module php5apache2.dll
</IfDefined>

This way php isn't loaded (and neither would my module). I think that this
won't work for unix (because the childs are shortlived), but i will first
have to create proxy stubs for all my functions. THen i will also need
something like conditional loading, to load the stub module into the childs,
and the worker module into the parent.

Am i missing something, or is there another way of doing this.

thanks
ben