David Wortham wrote:
SRP,
If I am correct, that will work if you only need to look at only
server/vhost cfg structures (won't work for directory, location,
files, or
.htaccess directives).
I believe that is correct. When I created a logging module to check
which hooks were being called and when, I found that per-directory
configurations are created at request-time, not at initialization time,
and are subsequently removed. AFAIK, the pools are trashed as soon as
the request is complete, meaning a global overview of what directives
are used in per-directory is just not unavailable.
If it is absolutely required, then per-directory functions that set
values from directives can be implemented that duplicate the
per-directory configuration on the global module config. However, that
can get very ugly very quickly. It might be easier to just have the
same function insert/update the directive and the corresponding
directory that it was found in into a database, and then search that if
necessary. Again, it requires a custom function to set the field from
the directives (command_rec* table sets this function in per-directory
configs via ap_set_*_slot functions).
Joe
--
Joseph Lewis <http://sharktooth.org/>
"Divide the fire, and you will sooner put it out." - Publius Syrus