|  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
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:
49 - 21 = ?
Subscribe to this entry?

 [2006-11-12 15:01 UTC] zxc at zmail dot ru
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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-13 09:21 UTC]
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: Thu Jul 18 05:01:28 2024 UTC