php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25043 doc_root doesn't works
Submitted: 2003-08-11 11:47 UTC Modified: 2003-08-11 11:56 UTC
From: duhaze at smcti dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 4.3.2 OS: Windows XP pro
Private report: No CVE-ID: None
 [2003-08-11 11:47 UTC] duhaze at smcti dot com
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"


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-08-11 11:56 UTC] sniper@php.net
It's open_basedir you want, not doc_root.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 21:01:30 2024 UTC