We have a number of php scripts that we have writen in house for various customers. Almost all of them use the DocumentRoot varialbe to find their includes. We are trying to move to Dynamic Virtual Hosts, so we can add and remove domains without having to edit httpd.conf or kill -HUP the server. Thing were going great till we started testing the scripts. For the virtualhosts we tried setting VirtualDocumentRoot, but the script was being passed the core DocumentRoot. So I set DocumentRoot for the virtual host in addition to the VirtualDocumentRoot and we were still getting the system wide definition. I don't see VirtualDocumentRoot being passed so 'just' (several hundred scripts needing changing is hard to define as 'just') changing the variable name in the scripts.
Apache says we're stupid for trusting the DocumentRoot variable in the first place (I'm failling to see Apache's logic in this...):
Can anyone suggest a fix and still use the Dynamic Virtual Hosting and not hard code all the paths in all the scripts?