ID: 23580
Updated by: [EMAIL PROTECTED]
Reported By: maximiliano dot marques at bol dot com dot br
Status: Open
Bug Type: Apache related
Operating System: Conectiva Linux 8 Kernel 2.4.19
PHP Version: 4.3.2
New Comment:
I'm trying to reproduce this, but so far without any success. I tried
to stress-test PHP with multiple vhosts and see if there are any
'leaks' of include_paths - but after hundreds of thousands of requests,
there were none.
I'm very interested in what you say about the single-process mode.
Basically, what you describe is *not* the behavior PHP is supposed to
display. The include_path settings should go back to its original
setting at the end of each request. This is also the behavior that I'm
seeing in my setup.
How did you determine that the include_path setting remains 'cached'?
If that is really the case, then it would greatly help if you could
provide me with temporary access to your server, so I can debug this.
If it's not the case, then it appears we're back in square one...
Previous Comments:
------------------------------------------------------------------------
[2003-07-16 07:42:21] katana at katana-inc dot com
We have experienced the same problem here since a few month. I was told
that it was gonna be fixed in 4.3.2 but it looks like it's still here
(we were warned by a disk full error because of the error logged filled
with failed includes from an auto_prepend file that belongs to another
vhost).
We can't upgrade to a snapshot since it is a production server.
We are running Gentoo but the same was happening with RedHat 8, running
apache 1.3.27.
The only fix was to change MaxRequestPerChild to 1...
------------------------------------------------------------------------
[2003-06-25 07:34:48] maximiliano dot marques at bol dot com dot br
First answering your questions:
>Do you set the include_path for _every_ vhost?
Not every but almost. I have 7 vhosts and 5 using different
include_path values.
>Do you have php.ini and is it loaded?
Yes, I do and it was loaded since it appear in phpinfo() briefing.
>What is the include_path setting in your php.ini?
include_path = "."
>How many vhosts do you have in your httpd.conf?
7 and I use dynamic IP for all. 3 of them are using same DocumentRoot
but different include_path values.
>If you start apache in single server mode, does it still
happen for every request? (httpd -X -F -DSSL)
Yes, it does. However as in this case there is only one process
running, at first request it keep the include_path value forever. I am
explaining better below.
Second I executed several tests including your recommendations above,
adding _�_ around the path and I used netstat and ps to follow httpd
child process behavior while I running your suggested script:
<?php echo ini_get('include_path'); ?>
My conclusion was that the first request that a child process run with
include_path given, it cache the value for include_path (no matter if
it was set in httpd.conf or .htaccess, I tried with both) and child
process never change include_path value anymore while it still alive.
I am using �MaxRequestsPerChild 1� as workaround and however it is
working, performance is debilitated.
------------------------------------------------------------------------
[2003-06-23 20:13:55] [EMAIL PROTECTED]
Try adding "'s around the path. (I always have them around the paths,
e.g. 'php_value include_path "/www/common/:."')
Some questions we need get answers for:
Do you set the include_path for _every_ vhost?
Do you have php.ini and is it loaded?
What is the include_path setting in your php.ini?
How many vhosts do you have in your httpd.conf?
If you start apache in single server mode, does it still
happen for every request? (httpd -X -F -DSSL)
Please run all these tests using this script:
<?php echo ini_get('include_path'); ?>
------------------------------------------------------------------------
[2003-06-19 02:25:19] maximiliano dot marques at bol dot com dot br
Yes I did and it behave exactly the same.
And I also compiled without
--with-regex=system
--enable-inline-optimization
and nothing changed.
I have set include_path in httpd.conf. The follow code I extracted from
my httpd.conf. I am working only with virtual hosts.
<VirtualHost *:80>
ServerAdmin [EMAIL PROTECTED]
DocumentRoot /sites/imax/http
ServerName imax.maximiliano.info
ServerAlias imax www.imaxmedia.com.br
ErrorLog logs/imax-error_log
CustomLog logs/imax-access_log common
php_value include_path
.:/sites/imax/includes:/sites/imax/instance/imx/includes
Alias /photo/ "/sites/imax/instance/imx/photo/"
Alias /file/ "/sites/imax/instance/imx/file/"
Alias /img/ "/sites/imax/instance/imx/img/"
Alias /img_dyn/ "/sites/imax/instance/imx/img_dyn/"
Alias /style/ "/sites/imax/instance/imx/style/"
Alias /https/ "/sites/imax/https/"
</VirtualHost>
------------------------------------------------------------------------
[2003-06-17 05:40:57] [EMAIL PROTECTED]
And leave these options out: (first do, "rm config.cache")
--with-regex=system
--enable-inline-optimization
------------------------------------------------------------------------
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/23580
--
Edit this bug report at http://bugs.php.net/?id=23580&edit=1