Re: Overriding $DOCUMENT_ROOT in an Apache Module
| From: | Mark Morley | Date: | Thu, 25 Sep 2003 16:40:35 +0000 |
| Subject: | Re: Overriding $DOCUMENT_ROOT in an Apache Module | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-4588@lists.php.net to get a copy of this message | ||
> Care sharing what you did to fix it? On or offlist is fine.
>
> Jeremy
Probably the same thing that the other fellow wound up doing.
In src/main/util_script.c Apache explicitly adds a new
DOCUMENT_ROOT value (among others) to the environment table.
This effectively wipes out any DOCUMENT_ROOT value that
I'd set in my module. Any value that Apache does NOT override
later on gets passed through to PHP's environment just fine.
I changed util_script.c to check for a DOCUMENT_ROOT value
first so it only adds one if it doesn't already exist. It
means maintaining a patch for Apache, but I already do that
for that file anyway due to some other unrelated cusomizations.
If there's a better way I'm all ears, but this works.
Mark