httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Gross <>
Subject BUG ? Question about server root
Date Thu, 10 May 2001 20:37:25 GMT

I am working with Apache 2.0 for Windows and am developing dynamically
loaded modules.  The Apache executable is in one directory and the
working directory is elsewhere.  When I set ServerRoot to
c:/projects/cppserver/website, and Apache attempts to load a module it
still thinks it is in the executable directory.

Here is how I worked through the error.  The error is in the function
ap_server_root_relative and the variable ap_server_root is set to the
directory of the executable and not the ServerRoot that I specified in
the configuration file.  I then decided to see if the function
set_server_root function was called from the command table.  And lo
and behold it is not.  So then I was thinking ServerRoot does get
called, but why is it the wrong value?  And the answer is because the
config parsing order is wrong.  When the config tree is loaded the
module is loaded is in the ap_read_config step.  But the problem is
that the ServerRoot directive is not parsed until the
ap_process_config_tree function.  This means when Apache attempts to
load a module the ServerRoot has not yet been parsed, Apache generates
and error and exits.  

Now the question is, did I do something wrong?  My current workaround
is to use an absolute path.  

Before I submitted this bug I tried searching for a previous mention
of this bug and did not seem to find anything.  But if someone already
submitted it sorry...

Christian Gross

View raw message