| Bug #11759 | DOCUMENT_ROOT not available when using PHP with IIS5 (cgi Version) | ||||
|---|---|---|---|---|---|
| Submitted: | 27 Jun 2001 7:37pm UTC | Modified: | 28 Jun 2001 12:16pm UTC | ||
| From: | blankart at muenchen-lottoteam dot de | Assigned to: | |||
| Status: | Bogus | Category: | IIS related | ||
| Version: | 4.0.6 | OS: | W2K | ||
[27 Jun 2001 7:37pm UTC] blankart at muenchen-lottoteam dot de
[27 Jun 2001 7:41pm UTC] blankart at muenchen-lottoteam dot de
<? echo $DOCUMENT_ROOT; ?> </P> Causes the following: Warning: Undefined variable: DOCUMENT_ROOT in w:\inetpub\wwwroot\test1.php4 on line 13
[28 Jun 2001 12:16pm UTC] brianlmoon@php.net
DOCUMENT_ROOT is an environment/server variable set by Apache. You will need to determine the equivalent if there is one for IIS. Brian.
[14 Jan 2004 2:32pm UTC] m dot v dot d dot wetering at xs4all dot nl
To solve this problem set the DOCUMENT_ROOT variable in the environment on your server (ControlPanel >> System >> Advanced >> Environment variables...). I set the variable in the System variables part and after a reboot the variable is accessible through PHP. (Tested on Windows2000 with IIS 5)
