From:             zxc at zmail dot ru
Operating system: FreeBSD 6.1
PHP version:      4.4.4
PHP Bug Type:     *Directory/Filesystem functions
Bug description:  I have got file listing of /

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 bug report at http://bugs.php.net/?id=39481&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=39481&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=39481&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=39481&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=39481&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=39481&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=39481&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=39481&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=39481&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=39481&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=39481&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=39481&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=39481&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=39481&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=39481&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=39481&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=39481&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=39481&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=39481&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=39481&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=39481&r=mysqlcfg

Reply via email to