httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben van Klinken" <bvanklin...@gmail.com>
Subject [users@httpd] LoadModule - child/parent behaviour
Date Sat, 11 Mar 2006 12:32:19 GMT
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

Mime
View raw message