Re: HTTP_SERVER_VARS["DOCUMENT_ROOT"] on IIS Windows 2000

From: Date: Mon, 23 Jul 2001 22:34:10 +0000
Subject: Re: HTTP_SERVER_VARS["DOCUMENT_ROOT"] on IIS Windows 2000
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-8468@lists.php.net to get a copy of this message
James, Thank you. This is precisely what I wanted to know and how to get around this. The define() idea is pretty ingenious. =) Thanks, Stephen ----- Original Message ----- From: <sysadmin@cheezy.net> To: "'Stephen'" <stephent@jps.net> Cc: <php-windows@lists.php.net> Sent: Monday, July 23, 2001 10:37 AM Subject: Re: HTTP_SERVER_VARS["DOCUMENT_ROOT"] on IIS Windows 2000 > You do not have access to that information when running in CGI mode. It's a > bitch, but your options are limited: > > 1. if you're only running one domain with PHP, set the document_root > variable in php.ini > > 2. define(DOCUMENT_ROOT, "d:\inetpub\wwwroot\domain1") in each page, or an > include > > 3. the work-around that we use is to set a system environment variable that > can then be > accessed by the line: $HTTP_ENV_VARS["DOMAIN_DOCUMENT_ROOT"]. Our > solution can > be construed as dangerous because it theoretically allows any PHP site > on the box to > gain access to another doc root. However, since we have locked down > each site's > anonymous user to only have read/write permissions on their own wwwroot > (and exec > permissions on PHP.exe), they are unable to do anything with that > information. > > hth, > -james. > > To: php-windows@lists.php.net > Reply-To: "Stephen" <stephent@jps.net> > From: "Stephen" <stephent@jps.net> > Date: Sun, 22 Jul 2001 14:31:32 -0400 > Subject: HTTP_SERVER_VARS["DOCUMENT_ROOT"] on IIS Windows 2000 > > Hi, > I've been trying to find information on this, and none of them directly tell > me what I am missing. > > I have IIS on Windows 2000 Professional. I have installed PHP as a CGI > module via the installshield (phpinfo() runs ok, so the installation appears > ok). > > I look at the list of server variables, and $DOCUMENT_ROOT is not listed. > > I don't think this is the same as doc-root in the php.ini. > > Can somebody advise as to what I am doing wrong? > I am trying not to install the ISAPI DLLs. > > Thank you for your time. > > --Stephen > >

« previous php.windows (#8468) next »