httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Enlightenment <>
Subject [users@httpd] [Bug] Apache 2.0.46 messes up virtual hosts using php_value auto_prepend_file
Date Sun, 06 Jul 2003 09:53:45 GMT
Hello all,

I'm encountering a difficult problem, and I think it is a bug.

*The situation:*

- I use both Apache 2.0.46 and PHP 4.3.3RC1
- I have two VirtualHosts in my httpd.conf: 
<> and
- I have an unedited php.ini

*The problem:*

Sometimes when I'm browsing pages on the 
VirtualHost, i get the following PHP error:

Warning: head(/www/
failed to open stream: No such file or directory
in /usr/local/www/sites/ on line 63

*What I believe is happening:*

I think Apache mixes up the two different VirtualHosts. As i'm browsing 
on, Apache surely has *nothing* to do on the 
/sites/ directory.

It may have something to do with a special directive I use in my 

NameVirtualHost *

<VirtualHost *>
    ServerName 62.216.x.x
    DocumentRoot /www/default
    ErrorLog /www/logs/default-error
    CustomLog /www/logs/default-access common

<VirtualHost *>
    ServerName <>
    DocumentRoot /www/
    ErrorLog /www/logs/
    CustomLog /www/logs/ common
    ErrorDocument 403 /error.php?error=403
    ErrorDocument 404 /error.php?error=404
    php_value auto_prepend_file /www/

<VirtualHost *>
    DocumentRoot /www/
    ErrorLog /www/logs/
    CustomLog /www/logs/ common

As you can see, for <> I use the 
php_value auto_prepend_file, so that for every document requested, 
init.php is prepended first.

*So what is the bug?*

I believe Apache sometimes prepends the init.php from 
<> on an request. But in 
the init.php other files are included as well, but since these are out 
of the scope of sqladmin, a very weird error is produced by PHP.

*What do you guys think?*

I was thorough in my research afaik. I setup a new webserver from 
scratch. But I got the same problems. The previous one used PHP 4.3.2 
final, the new one uses 4.3.3RC1, no difference. On the first line of 
init.php I put echo('XXX'); and some pages on sqladmin would actually 
print out XXX, this means that Apache makes a big mistake by messing up 
the VirtualHosts. Am i correct?

Further information: both webservers are on different physical machines, 
use modern hardware and run FreeBSD 5.1-RELEASE.


- Enlightenment

View raw message