DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26052>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26052 DOCUMENT_ROOT environment variable set incorrectly with VirtualDocumentRoot Summary: DOCUMENT_ROOT environment variable set incorrectly with VirtualDocumentRoot Product: Apache httpd-1.3 Version: 1.3.29 Platform: All OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: mod_vhost_alias AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] When calling CGI scripts, apache usually sets the DOCUMENT_ROOT environment variable before calling the script. This can be used within CGI scripts to find related files. However, DOCUMENT_ROOT seems to be set to a wrong default value, when using VirtualDocumentRoot as follows: <VirtualHost myiP> ServerName name1.domain.tld ServerAlias name2.domain.tld ServerAlias name3.domain.tld ... UseCanonicalName off VirtualDocumentRoot /home/%-3/wwwdir VirtualScriptAlias /home/%-3/wwwdir/cgi-bin </VirtualHost> In my opinion, the DOCUMENT_ROOT environment should be set to whatever VirtualDocumentRoot expanded to, when calling a CGI script. The problem has been verified with 1.3.29. It occured both with scripts called directly or via an action handler (see apache configuration command "Action" and "AddHandler"). If a CGI script is called via "Action" and "AddHandler", it typically uses DOCUMENT_ROOT and REQUEST_URI to locate the file, that it has to process. So the wrong DOCUMENT_ROOT is a serious issue in this case. In particular, if PHP is not compiled into apache, but executed as a seperate script, running PHP scripts might fail completely in an environment, that uses VirtualDocumentRoot! Kai Petzke --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
