From: sreniaw at wp dot pl
Operating system: Solaris
PHP version: 5.1.4
PHP Bug Type: *General Issues
Bug description: problem with open_basedir restriction
Description:
------------
I have configured php'a open_basedir for directory /wwwroot/default in
httpd.conf.
open_basedir = /wwwroot/default
/wwwroot/default
-test.txt
-test.php
I've tryied to read test.txt file, but I can not do it
baceuse of open_basedir restriction.
Reproduce code:
---------------
<?php
readfile("test.txt");
?>
Expected result:
----------------
Read file test.txt
Actual result:
--------------
Warning: readfile() [function.readfile]: open_basedir restriction in
effect. File(test.txt) is not within the allowed path(s):
(/wwwroot/default) in /wwwroot/default/test.php on line 2
Warning: readfile(test.txt) [function.readfile]: failed to open stream:
Not owner in /wwwroot/default/test.php on line 2
--
Edit bug report at http://bugs.php.net/?id=37907&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=37907&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=37907&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=37907&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37907&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=37907&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37907&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37907&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37907&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37907&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37907&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=37907&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=37907&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37907&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37907&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37907&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37907&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37907&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37907&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37907&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37907&r=mysqlcfg