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: [EMAIL PROTECTED]
Reply-To: "Stephen" <[EMAIL PROTECTED]>
From: "Stephen" <[EMAIL PROTECTED]>
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


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to