Bug #14396: open_basedir check in nested include does not allow subdirs

From: Date: Mon, 10 Dec 2001 02:52:22 +0000
Subject: Bug #14396: open_basedir check in nested include does not allow subdirs
Groups: php.dev 
Request: Send a blank email to php-dev+get-73146@lists.php.net to get a copy of this message
From: matthias-php@kopolt.com Operating system: linux / redhat 7.1 PHP version: 4.0.6 PHP Bug Type: PHP options/info functions Bug description: open_basedir check in nested include does not allow subdirs with enabled safe-mode and open_basedir restriction it is not possible to execute a include/require/... function in a included file that tries to include a file that is in a subdirectory of the initially executed script. WORKAROUND: Placing all included files into the same directory works fine, but is quite a bunch of work and not always suitable when adapting supplied software and scripts, e.g. running phpNuke in this environement. example: in documentroot: file test.php: <?php require_once ('test/1.php'); require_once ('test/2.php'); require_once ('test/3.php'); ?> in the subdir test: 1.php: <?php include ('3.php'); ?> 2.php: foo_2 3.php: foo_3 error: Warning: open_basedir restriction in effect. File is in wrong directory in /home/sites/x/www/test/1.php on line 1 Apache's httpd.conf sets this param: php_admin_value open_basedir /home/sites/x open_basedir is tested and working fine, except those nested includes. thanks for checking mk -- Edit bug report at: http://bugs.php.net/?id=14396&edit=1

« previous php.dev (#73146) next »