From: duhaze at smcti dot com
Operating system: Windows XP pro
PHP version: 4.3.2
PHP Bug Type: PHP options/info functions
Bug description: doc_root doesn't works

Description:
------------
Safe mode + doc_root does not work on windows XP Pro + Apache 2.0.47 + php
( as module ) even if the safe_mode variable is "on" and the "doc_root"
variable is set.




Reproduce code:
---------------
$lines = file ('c:/windows/php.ini');
foreach ($lines as $line_num => $line)
echo "Line #<b>{$line_num}</b> : " . htmlspecialchars($line) .
"<br>\n";
$d = dir("e:"); //or $d = dir("c:\windows");
echo "Handle: ".$d->handle."<br>\n";
echo "Path: ".$d->path."<br>\n";
while (false !== ($entry = $d->read()))
echo $entry."<br>\n";
$d->close();
phpinfo();


Expected result:
----------------
not the "c:\windows\php.ini" file
nor the "e:\" directory

Actual result:
--------------
Always display all the lines of "c:\windows\php.ini" file and all the
items of the directory "e:\" even if the printinfo() procedure say that :
safe_mode is "ON"
doc_root is "E:/_apache"


--
Edit bug report at [url]http://bugs.php.net/?id=25043&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=25043&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=25043&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=25043&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=25043&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=25043&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=25043&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=25043&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=25043&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=25043&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=25043&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=25043&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=25043&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=25043&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=25043&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=25043&r=gnused[/url]