Edit report at http://bugs.php.net/bug.php?id=53514&edit=1
ID: 53514 Comment by: ofi at evil dot net dot pl Reported by: tomsom...@php.net Summary: open_basedir broken in PHP 5.2.15, denies access to all files Status: Open Type: Bug Package: Safe Mode/open_basedir Operating System: Linux PHP Version: 5.2.15 Block user comment: N Private report: N New Comment: Please see bug #53516 Sorry for double-posting a bug Previous Comments: ------------------------------------------------------------------------ [2010-12-10 10:03:58] cataphr...@php.net Yes, in 5.2 even this fails: /home/glopes/php/php5.2/bin/php -d open_basedir=/ -r "echo fopen('a.php', 'r');" Warning: fopen(): open_basedir restriction in effect. File(a.php) is not within the allowed path(s): (/) in Command line code on line 1 ------------------------------------------------------------------------ [2010-12-10 10:03:16] tomsom...@php.net Cannot reproduce in PHP 5.3.4, seems to only affect 5.2.15 ------------------------------------------------------------------------ [2010-12-10 09:55:45] tomsom...@php.net Only tested in PHP 5.2.15, downloaded an hour ago # /usr/local/src/php-5.2.15/sapi/cli/php -d open_basedir=/root/ -r "echo fopen('/root/a.php', 'r');" Warning: fopen(): open_basedir restriction in effect. File(/root/a.php) is not within the allowed path(s): (/root/) in Command line code on line 1 Warning: fopen(/root/a.php): failed to open stream: Operation not permitted in Command line code on line 1 ------------------------------------------------------------------------ [2010-12-10 09:50:20] cataphr...@php.net I can't reproduce this with: /home/glopes/php/php5.3/bin/php -d open_basedir=/home/glopes/ -r "echo fopen('a.php', 'r');" Are you sure you're not using RC1? ------------------------------------------------------------------------ [2010-12-10 09:33:20] cataphr...@php.net See also http://www.mail-archive.com/debian-bugs-d...@lists.debian.org/msg847440.html ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/bug.php?id=53514 -- Edit this bug report at http://bugs.php.net/bug.php?id=53514&edit=1