From: pjolin at repsolution dot com Operating system: Win2k server PHP version: 4.3.4 PHP Bug Type: *Configuration Issues Bug description: include_path occasionnally ignores vhost setting
Description: ------------ I'm using PHP 4.3.4 on Apache 2.0.48 on Win2k adv server. My php.ini file does not have any value entered for include_path as I instead define vhost-specific values for include_path in apache's httpd.conf. Example: <virtualhost [...]> [...] php_value include_path ".;C:/Prod/MyApp/include;C:/Prod/MyApp/include/i18n;C:/Prod/MyApp/SessionControl;C:/Prod/SessionControl;C:/Prod/Common" </virtualhost> The problem that occurs is that once in a while, php will 'lose' the setting for include_path and default to include_path=".;c:\php4\pear". This obviously breaks my applications. I've had it happen every 1000-ish requests on average, although it has been known to happen on two consecutive requests, and I've also gone over 10,000 requests without it happening. It is happening on the current release (4.3.4), and was also happening on 4.3.1, and on all versions of Apache I've tried it on (I've been upgrading Apache as new releases became available starting at about 2.0.36). I've provided a sample script with which I can reliably reproduce the bug. Reproduce code: --------------- File 1: 'buggy_include_path.php' (in my webroot) ================================================ <HTML> <BODY> Current ini_get('include_path') : <?php echo ini_get('include_path').'<BR><BR>'; if (!isset($x)) $x = 1; echo 'Counter: '.$x.'<BR>'; require('_buggy_include_path.php'); ?> <script> document.location.href="buggy_include_path.php?x=<%=$x+1%>"; </script> </BODY> </HTML> File 2: _buggy_include_path.php (in an included path) ===================================================== <?php echo 'I am an included file.<BR>' ?> Expected result: ---------------- Current ini_get('include_path') : .;C:/Prod/MyApp/include;C:/Prod/MyApp/include/i18n;C:/Prod/MyApp/SessionControl;C:/Prod/SessionControl;C:/Prod/Common Counter: 1234 I am an included file. Actual result: -------------- Current ini_get('include_path') : .;c:\php4\pear Counter: 4088 Fatal error: main(): Failed opening required '_buggy_include_path.php' (include_path='.;c:\php4\pear') in C:\Prod\MyApp\webroot\buggy_include_path.php on line 8 -- Edit bug report at http://bugs.php.net/?id=27027&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27027&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27027&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27027&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27027&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27027&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27027&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27027&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27027&r=support Expected behavior: http://bugs.php.net/fix.php?id=27027&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27027&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27027&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27027&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27027&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27027&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27027&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27027&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27027&r=float