#39481 [Opn->Bgs]: I have got file listing of /

From: Date: Mon, 13 Nov 2006 09:21:20 +0000
Subject: #39481 [Opn->Bgs]: I have got file listing of /
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-104882@lists.php.net to get a copy of this message
ID: 39481 Updated by: tony2001@php.net Reported By: zxc at zmail dot ru -Status: Open +Status: Bogus Bug Type: *Directory/Filesystem functions Operating System: FreeBSD 6.1 PHP Version: 4.4.4 New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2006-11-12 15:01:06] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39481&edit=1

« previous php.bugs (#104882) next »