Raj Iyer wrote:
Hello,The Apache web server on start up iterates through the list of configuration directives and invokes the associated module handler foreach directive.For e.g. if module A has handlers for directives D1 and D2, then the httpd process on start up will invoke the handlers within module A when it encounters D1 and D2 in httpd.conf. However, what is the best way to find out missing mandatory parameters from within the module. For e.g. if a directive D3 is mandatory for the module to work, then how can the module on initialization guarantee thatthis configuration parameter is provided?I do not want to provide a default value for this mandatory configuration directive and also, I do not want to check whether thismandatory directive is defined or not while handling each request.
Hi.I do not know the answer to the above in all generality, for example for an Apache add-on module written in C.
But you may want to look at this : http://perl.apache.org/docs/2.0/user/handlers/server.htmlIt is about mod_perl, but mod_perl closely follows the innards of Apache, so I am quite sure that there must exist something similar to the PerlPostConfigHandler as a hook into Apache from a C module. The idea is : your module could define a function and register it with Apache using that hook. The function would be called when the Apache configuration is fully read, could check that all your directives have been encountered, and throw an error if not.
--------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx