|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-01-25 00:08 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 02:00:01 2025 UTC |
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