What can change the include_path between php.ini and a PHP file

apache, include, php

Solution

Outisde of the PHP ways

ini_set( 'include_path', 'new/path' );
// or
set_include_path( 'new/path' );

Which could be loaded in a PHP file via `auto_prepend_file`, an `.htaccess` file can do do it as well

phpvalue include_path new/path

Problem

I've inherited some code on a system that I didn't setup, and I'm running into a problem tracking down where the PHP include path is being set. I have a php.ini file with the following include_path ``` include_path = ".:/usr/local/lib/php" ``` I have a PHP file in the webroot named test.php with the following phpinfo call ``` <?php phpinfo(); ``` When I take a look at the the phpinfo call, the local values for the include_path is being overridden ``` Local Value Master Value include_path .;C:\Program Files\Apache Software Foundation\ .:/usr/local/lib/php Apache2.2\pdc_forecasting\classes ``` Additionally, the php.ini files indicates no additional .ini files are being loaded ``` Configuration File (php.ini) Path /usr/local/lib Loaded Configuration File /usr/local/lib/php.ini Scan this dir for additional .ini files (none) additional .ini files parsed (none) ``` So, my question is, what else in a standard PHP system (include some PEAR libraries) could be overriding the include_path between php.ini and actual php code being interpreted/executed.

Original source