|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-12-10 09:24 UTC] tomsommer@php.net
Description:
------------
The fix for CVE-2010-3436 broke open_basedir
Might also affect PHP 5.3.4
consider
php_admin_value open_basedir "/var/www/www.example.dk/:/var/www/tmp/:/usr/local/bin/safe/"
The DocumentRoot of the site is "/var/www/www.example.dk/www/"
Opening /var/www/www.example.dk/www/index.php (http://example.dk/index.php) triggers:
Warning: Unknown: open_basedir restriction in effect. File(/var/www/www.example.dk/www/index.php) is not within the allowed path(s): (/var/www/www.example.dk/:/var/www/tmp/:/usr/local/bin/safe/) in Unknown on line 0
Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
Warning: Unknown: open_basedir restriction in effect. File(/var/www/www.example.dk/www/index.php) is not within the allowed path(s): (/var/www/www.example.dk/:/var/www/tmp/:/usr/local/bin/safe/) in Unknown on line 0
Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
Fatal error: Unknown: Failed opening required '/var/www/www.example.dk/www/index.php' (include_path='.:/usr/local/lib/php') in Unknown on line 0
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 17:00:01 2025 UTC |
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?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 1Yes, 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