httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zeev Suraski <>
Subject Module initialization and per-directory config directives
Date Sat, 01 May 1999 20:31:42 GMT


One of the problems the PHP 3.0 Apache module had, was that httpd.conf
directives were being parsed before module startups.  Since PHP uses
various data structures to store values it reads from Apache directives
(among other sources), and since these data structures weren't being
initialized before Apache was calling the PHP's callback functions, we had
to change the callbacks so that they always call PHP's startup function
before going on.  Of course, we've put a flag inside that function so that
it won't actually initialize more than once, but still, each .conf or
.htaccess directive parsing resulted in an additional function call, and
that function call had to be written on the top of every handler. 

While cleaning mod_php3.c for PHP 4.0, I was wondering on whether this
behavior can be changed, or fixed in some way.  Is there no way to ensure
that the module's startup is run before its callbacks are called with
directive information? 

I realize that there's a good chance you can't simply move the module
startups to be called before the configuration parsing (for various
reasons), but if you can, or alternately, can provide an additional module
initialzation function that's guarenteed to be called before the
configuration parsing, it would make callbacks look cleaner and be more


Zeev Suraski <>
For a PGP public key, finger

View raw message