ID: 20117 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Status: Open Bug Type: PHP options/info functions Operating System: Solaris 8 & Linux Madrake PHP Version: 4.2.3 New Comment:
BTW, all scripts and directories have correct permissions and include_path is ./:/usr/local/http-docs/common/lib:/usr/local/lib/php Previous Comments: ------------------------------------------------------------------------ [2002-10-27 06:40:58] [EMAIL PROTECTED] a scripts located in open_basedir path is unable to include another script in the same directory with error " open_basedir restriction in effect. File is in wrong directory" where the first script is included from another script. You can reproduce this situation with 3 php scripts with safe_mode on: /usr/local/http-docs/common/scripts/test.php -------------- <?php include("test/test.php"); ?> /usr/local/http-docs/common/lib/test/test.php ------------- <?php phpinfo(); include("hello.php"); ?> /usr/local/http-docs/common/lib/test/hello.php ------------- <?php echo "hello world"; ?> Apache configuration to reproduce the situation -------------- <Directory "/usr/local/http-docs/common/lib/"> Options none AllowOverride None Order allow,deny Deny from all </Directory> Alias /scripts/ "/usr/local/http-docs/common/scripts/" <Directory "/usr/local/http-docs/common/scripts/"> Options none AllowOverride None Order allow,deny Allow from all php_admin_value open_basedir /usr/local/http-docs/common/scripts/:/usr/local/http-docs/common/lib </Directory> <VirtualHost 192.168.0.3> ServerName 192.168.0.3 DocumentRoot /usr/local/http-docs/test php_admin_value open_basedir /usr/local/http-docs/test:/usr/local/http-docs/common/lib:/var/tmp:/usr/local/lib/php php_admin_value doc_root /usr/local/http-docs/test </VirtualHost> to reproduce the error just go to https://192.168.0.3/scripts/test.php altough phpinfo() on /usr/local/http-docs/common/lib/test/test.php shows that open_basedir includes /usr/local/http-docs/common/lib php fails to open hello.php php configure line (Solaris): ./configure --with-mysql --with-apache=$(APACHE) \ --enable-track-vars --enable-versioning \ --enable-sockets --enable-dbase \ --enable-exif \ --enable-ftp --with-mm \ --with-dbase --with-ftp --with-ndbm \ --with-gd=/usr/local --enable-gd-native-ttf \ --with-zlib-dir=/usr/local \ --with-curl=/usr/local --with-openssl \ --with-pcre --with-mcrypt=/usr/local/lib --with-xml \ --enable-ucd-snmp-hack \ --enable-inline-optimization \ --disable-debug --disable-display-source \ --with-jpeg-dir=/opt/sfw \ --with-imap=$(IMAP) --with-zlib \ --with-png-dir=/opt/sfw --with-tiff-dir=/opt/sfw ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20117&edit=1