Wierd set_include_path behaviour

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

The following instructions behave in a strange way :

echo "CURRENT = " . get_include_path() . "<br>";
echo "OLD  = " . set_include_path('/inc') . "<br>";
echo "NEW = " . get_include_path() . "<br>";

I set my php.ini file as below :
    include_path = .:/usr/lib/php:/usr/lib/php/ZendFramework-1.0.0/library;
Nothing's set in Apache's httpd.conf (no 'php_value include_path' setting).

After starting Apache, when requesting the page, I get what I expect :

CURRENT = .:/usr/lib/php:/usr/lib/php/ZendFramework-1.0.0/library
OLD = .:/usr/lib/php:/usr/lib/php/ZendFramework-1.0.0/library
NEW = /inc

Though, after reloading a few times the page, the set_include_path()
instruction doesn't work any longer :

CURRENT = .:/usr/lib/php:/usr/lib/php/ZendFramework-1.0.0/library
NEW = .:/usr/lib/php:/usr/lib/php/ZendFramework-1.0.0/library

In the first case, phpinfo() gives :
Local Value : /inc
Master Value : .:/usr/lib/php:/usr/lib/php/ZendFramework-1.0.0/library
and then on:
Local Value : .:/usr/lib/php:/usr/lib/php/ZendFramework-1.0.0/library
Master Value : .:/usr/lib/php:/usr/lib/php/ZendFramework-1.0.0/library

By printing the PID of the Apache process executing the page, it seems that
as long as the one that executed the set_include_path() instruction keeps
executing the page, it works. But as soon as a new one takes it on, it

Any idea ? Thanks in advance.

Apache 2.2.9
PHP 5.2.5


Re: Wierd set_include_path behaviour

are you using something like:

php_admin_value include_path .....

in your apache configuration, aren't you? :-)

try to replace it with

php_value include_path ....

Re: Wierd set_include_path behaviour

Quoted text here. Click to load it

no, as i said nothing is set on Apache side, neither 'php_value
include_path' nor 'php_admin_value include_path'.

Site Timeline