php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39481 I have got file listing of /
Submitted: 2006-11-12 15:01 UTC Modified: 2006-11-13 09:21 UTC
From: zxc at zmail dot ru Assigned:
Status: Not a bug Package: *Directory/Filesystem functions
PHP Version: 4.4.4 OS: FreeBSD 6.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: zxc at zmail dot ru
New email:
PHP Version: OS:

 

 [2006-11-12 15:01 UTC] zxc at zmail dot ru
Description:
------------
I have installed PHP (4.4.4) as mod_php for Apache 1.3.37
and I had set in httpd.conf in my VirtualHost section:

php_admin_value open_basedir "/usr/home/user" 
php_admin_value doc_root "/usr/home/user"

Now, I must not have access by PHP to /usr/home, /usr, /

But function file_get_contents() give me full file listing of / directory with small rubbish

Reproduce code:
---------------
<?
echo file_get_contents("/")
?>

Expected result:
----------------
full file listing of / directory with small rubbish

Actual result:
--------------
Warning: file_get_contents() [function.file-get-contents]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/usr/home/user) in /usr/home/user/www/test.php on line 2

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-13 09:21 UTC] tony2001@php.net
With php_admin_value in VirtualHost section you must restart Apache first and use the same virtual host, otherwise this directive is ignored.
Also see Apache & FreeBSD bug #38670.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 27 16:01:27 2024 UTC