httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Cohen" <>
Subject RE: [users@httpd] [Bug] Apache 2.0.46 messes up virtual hosts using php_value auto_prepend_file
Date Sun, 06 Jul 2003 18:44:51 GMT
I would first of all make sure that you have no directives for PHP in the
Server_Config that would be global for both Vhosts.

Other than that, ii would set two other simple Vhosts and check that they
are running as they suppose to.

If you are seeing that this problem accurs only when you use PHP integrated
into the Vhosts than obviously the problem is with PHP and the post should
be pointing to them.


All the best,

Jeff Cohen
Tel. (416) 917-2324
GEJ-IT Networks!


-----Original Message-----
From: Enlightenment [] 
Sent: Sunday, July 06, 2003 5:54 AM
Subject: [users@httpd] [Bug] Apache 2.0.46 messes up virtual hosts using
php_value auto_prepend_file


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 httpd.conf:



NameVirtualHost *
<VirtualHost *>
    ServerName 62.216.x.x
    DocumentRoot /www/default
    ErrorLog /www/logs/default-error
    CustomLog /www/logs/default-access common
<VirtualHost *>
    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

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


- Enlightenment

View raw message