php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27027 include_path occasionnally ignores vhost setting
Submitted: 2004-01-23 16:04 UTC Modified: 2004-01-25 00:08 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: pjolin at repsolution dot com Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 4.3.4 OS: Win2k server
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pjolin at repsolution dot com
New email:
PHP Version: OS:

 

 [2004-01-23 16:04 UTC] pjolin at repsolution dot com
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-01-25 00:08 UTC] sniper@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #25753
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 08:01:30 2024 UTC