|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11759 DOCUMENT_ROOT not available when using PHP with IIS5 (cgi Version)
Submitted: 2001-06-27 19:37 UTC Modified: 2001-06-28 12:16 UTC
From: blankart at muenchen-lottoteam dot de Assigned:
Status: Not a bug Package: IIS related
PHP Version: 4.0.6 OS: W2K
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
22 - 21 = ?
Subscribe to this entry?

 [2001-06-27 19:37 UTC] blankart at muenchen-lottoteam dot de
DOCUMENT_ROOT not available when using PHP with IIS5 (cgi Version). Works fine on Linux / Apache


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-27 19:41 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

 [2001-06-28 12:16 UTC]
DOCUMENT_ROOT is an environment/server variable set by Apache.  You will need to determine the equivalent if there is one for IIS.

 [2004-01-14 14:32 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)
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Jan 30 22:04:14 2023 UTC