Weird open_basedir behaviour

From: Date: Sat, 22 Nov 2003 00:55:08 +0000
Subject: Weird open_basedir behaviour
Groups: php.general 
Request: Send a blank email to php-general+get-170643@lists.php.net to get a copy of this message
I'm not sure if I have something misconfigured with this one or what, but I keep having odd open_basedir problems with my webserver. i'm running apache 2.0.48 with php 4.3.4. i have a number of virtual hosts, the following being an excerpt from the apache config: <VirtualHost *>
    ServerName www.hightechhigh.org 
    ServerAlias hightechhigh.org www 
#    php_admin_value open_basedir /www/htdocs:/tmp 
</VirtualHost> <VirtualHost *>
    ServerName plato.hightechhigh.org 
    ServerAlias plato plato.ntc.hightechhigh.org 
    DocumentRoot /www/platohtdocs 
    ErrorLog logs/plato-error_log 
    CustomLog logs/plato-access_log combined 
#    php_admin_value display_errors On 
</VirtualHost> <VirtualHost *>
    ServerName staff.hightechhigh.org
    ServerAlias staff
    DocumentRoot /www/platohtdocs
    ErrorLog logs/plato-error_log
    CustomLog logs/plato-access_log combined
    UserDir /home/staff/*
    php_admin_value open_basedir .:/tmp
</VirtualHost> <VirtualHost *>
    ServerName students.hightechhigh.org
    ServerAlias students
    DocumentRoot /www/platohtdocs
    ErrorLog logs/plato-error_log
    CustomLog logs/plato-access_log combined
    UserDir /home/students/*
    php_admin_value open_basedir .:/tmp
#    php_admin_value display_errors On
</VirtualHost> ... periodically when i hit one of the pages on the main site, i get a blank page, and the following shows up in the error log: # tail error_log [client 172.16.10.14] PHP Warning: main(): open_basedir restriction in effect. File(/www/htdocs/common/template.php) is not within the allowed path(s): (.:/tmp) in /www/htdocs/schoolinfo/calendar.php on line 2 [client 172.16.10.14] PHP Warning: main(/www/htdocs/common/template.php): failed to open stream: Operation not permitted in /www/htdocs/schoolinfo/calendar.php on line 2 [client 172.16.10.14] PHP Fatal error: main(): Failed opening required '/www/htdocs/common/template.php' (include_path='.:/usr/local/apache2/php/lib/php') in /www/htdocs/schoolinfo/calendar.php on line 2 When this happens, I can hit reload and tha page will pop up fine. I have open_basedir commented out in the php.ini file. it seems like php is picking up the open_basedir value from one virtual host and applying it to a different virtual host, some of the time. any help would be appreciated. if this is a bug, is it in php or apache, and if php how do i submit a bug report? if it matters, this is running on a dual pentium 3 machine with linux 2.4.21, apache and php compiled from source, with the following commands: ./configure --with-ldap --enable-ldap --enable-auth-ldap --enable-so --enable-ssl ./configure --prefix=/usr/local/apache2/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/apache2/php --with-mysql=/usr/local/mysql --with-ldap tim

« previous php.general (#170643) next »