ID: 27110 Comment by: lami at geocities dot com Reported By: walter at brunner dot at Status: No Feedback Bug Type: Apache2 related Operating System: Linux (Gentoo) PHP Version: 4CVS-2004-02-01 Assigned To: iliaa New Comment:
I want to add that this bug isn't relatod to auto_prepend_file only. PHP 4.3.9, Apache 2.0.52, Linux (Gentoo), kernel 2.4.25 My setup: Global apache config has php_engine off. Several virtual hosts override this in their <Virtualhost> part of config file. I also set open_basedir for each virtual host. It behaves similar like several people wrote (seems like thread keeps config from before), but doesn't seems to me to be dependent on specific configuration, only different vhosts. If I keep reloading same PHP page, sometimes it gets executed, sometimes it returns source code. Sometimes PHP gets executed, but fails with: Warning: Unknown(): open_basedir restriction in effect. File(file from one vhost) is not within the allowed path(s): (path from other vhost) in Unknown on line 0 Previous Comments: ------------------------------------------------------------------------ [2004-07-07 15:45:04] j dot svoboda at phoenix dot cz The problem still manifests when the directive auto_prepend_file and the Directory container are used together. Please see the reproduce code at http://www.p-i-n.cz/doc/phpbug.txt. ------------------------------------------------------------------------ [2004-04-19 13:16:19] j dot svoboda at phoenix dot cz I am sorry, I stripped part of configure command. The full command is: './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql=/usr/local/mysql' '--with-imap=/usr/local/src/imap' ------------------------------------------------------------------------ [2004-04-19 13:08:13] j dot svoboda at phoenix dot cz I can 100% reproduce this error. How to reproduce (my case): We use the supplied Apache configuration (with several insignificant changes, listed at the bottom) and these local settings (included from separate file httpd-test-local.conf): ----- StartServers 1 MaxClients 1 DocumentRoot "/www" AddType application/x-httpd-php .php <Directory /> Order allow,deny Allow from all php_value include_path ".:/usr/local/lib/php:/www/lib" </Directory> # Development <Directory /www/epv> php_value include_path ".:/usr/local/lib/php:/www/libv:/www/lib" </Directory> # Authentication <LocationMatch "^/ep"> php_value auto_prepend_file a.php </LocationMatch> ----- In /www, we have four directories, ep, epv, lib, libv. (ep* is for PHP scripts, lib* is for PHP libraries; versions with 'v' stand for 'deVelopment'). In ep*, we have simple script i.php containing the command <? echo ini_get("include_path"); ?> In lib, I have the empty file a.php. 1. I restart apache 2. I open the file /ep/i.php in my browser, and it prints ".:/usr/local/lib/php:/www/lib" 3. I open the file /epv/i.php in my browser, and it prints ".:/usr/local/lib/php:/www/lib" where it should print ".:/usr/local/lib/php:/www/libv:/www/lib" It seems that the problem manifests only in combination with auto_prepend_file. ----- "Insignificant changes" in apache configuration: diff httpd-std.conf httpd-test.conf 81c81 < PidFile logs/httpd.pid > PidFile logs/httpd-8080.pid 219c219 < Listen 80 > Listen 8080 231a232 > LoadModule php4_module modules/libphp4.so 1049a1051 > Include /usr/local/apache2/conf/httpd-test-local.conf ----- System settings: System: FreeBSD www.p-i-n.cz 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Wed Jan i386 Configure Command: './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql SERVER_SOFTWARE: Apache/2.0.49 (Unix) PHP/4.3.5 ----- ------------------------------------------------------------------------ [2004-03-24 17:24:24] [EMAIL PROTECTED] It's fixed for me in 4.3.5RC3 Try the latest 4.3.5 RC, or CVS snapshot ------------------------------------------------------------------------ [2004-03-24 11:19:57] bfriday at lasierra dot edu Installed php-4.3.4 and this bug continues to be a problem moved to the latest RC2 when it came out last week and the bug while listed in other reports as "fixed" continues to be a problem. I've got a virtual host situation in which the following is occuring: 1) primary hostname is fine it is not using php so there is no error 2) this virtual host is fine but is using php and it has some additional information which is set over and above our default settings in the php.ini via .htaccess files. 3) this virtual host is using just html so is fine as well 4) this virtual host would like to use php but cannot as php demands to look for setting which is not defined in the global .htaccess but rather in the .htaccess of virtual host 2. PHP consistently errors out and is unusable on this host as no program gets past the php_value auto_prepend_file line which is located in virtual host 2's .htaccess file. Please let me know if you have need of further information I can provide the domain names to a developer to do a look see but would need to do that privately. I'd really appreciate it if this is fixed as it makes using php in a virtual host setting impossible. ------------------------------------------------------------------------ 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/27110 -- Edit this bug report at http://bugs.php.net/?id=27110&edit=1