httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Cohen" <supp...@gej-it.com>
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
Support@GEJ-IT.com
Tel. (416) 917-2324
www.GEJ-IT.com
GEJ-IT Networks!

 

-----Original Message-----
From: Enlightenment [mailto:enlightenment@scholieren.com] 
Sent: Sunday, July 06, 2003 5:54 AM
To: users@httpd.apache.org
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: www.fluffles.net and
sqladmin.fluffles.net 
- I have an unedited php.ini 


The problem: 

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

code:





  _____  



Warning: head(/www/sqladmin.fluffles.net/head.php):
failed to open stream: No such file or directory
in /usr/local/www/sites/fluffles.net/init.php on line 63





  _____  






What I believe is happening: 

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

It may have something to do with a special directive I use in my httpd.conf:


code:





  _____  



NameVirtualHost *
 
<VirtualHost *>
    ServerName 62.216.x.x
    DocumentRoot /www/default
    ErrorLog /www/logs/default-error
    CustomLog /www/logs/default-access common
</VirtualHost>
 
<VirtualHost *>
    ServerName www.fluffles.net
    DocumentRoot /www/fluffles.net
    ErrorLog /www/logs/fluffles.net-error
    CustomLog /www/logs/fluffles.net-access common
    ErrorDocument 403 /error.php?error=403
    ErrorDocument 404 /error.php?error=404
    php_value auto_prepend_file /www/fluffles.net/init.php
</VirtualHost>
 
<VirtualHost *>
    ServerName sqladmin.fluffles.net
    DocumentRoot /www/sqladmin.fluffles.net
    ErrorLog /www/logs/sqladmin.fluffles.net-error
    CustomLog /www/logs/sqladmin.fluffles.net-access common
</VirtualHost>





  _____  




As you can see, for www.fluffles.net 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 www.fluffles.net on an
sqladmin.fluffles.net 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.

Thanks!

- Enlightenment


Mime
View raw message