php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44178 include_path set in vhost reverts to php.ini default intermittently
Submitted: 2008-02-19 23:40 UTC Modified: 2008-02-24 00:21 UTC
From: tallyce at gmail dot com Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 5.2.5 OS: Vista
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: tallyce at gmail dot com
New email:
PHP Version: OS:

 

 [2008-02-19 23:40 UTC] tallyce at gmail dot com
Description:
------------
I'm running Vista/Apache2.2.8/PHP5.2.5 with PHP as mod_php rather than as a CGI. Apache2 was installed using the msiexec /i flag as described here: www.simonwhatley.co.uk/installing-apache-on-vista .

The include_path set in a vhost basically just gets 'forgotten' after a while and the value set in the specified php.ini gets used. As a result, applications fail because they can't find the files intended to be included, with the result:

Warning: require_once(app.php) [function.require-once]: failed to open stream: No such file or directory in C:\Users\Tallyce\Documents\Website1\launcher.php on line 12

Fatal error: require_once() [function.require]: Failed opening required 'app.php' (include_path='.;C:\Program Files\php\pear;C:\PROGRA~1\php\pear') in C:\Users\Tallyce\Documents\Website1\launcher.php on line 12

(so PHP is still running, just not looking in the right place any more.)

Restarting apache's 'Restart' link on the start menu using right-click > 'Run as Administrator' fixes the problem, until it happens again.

Different vhosts seem to lose the setting at different times.

The problem seems to happen more often when other sites' pages are loaded more often. About 20 page loads are sometimes enough to cause the problem to happen again.

The problem started after starting to use Vista rather than XP as before.


I've tried running Process Monitor from sysinternals, and limiting the results to httpd.exe . I notice that the following output does not always appear, though before this point the output is consistent (though I've no idea if this is relevant). After this point, the output changes to reflect the different include_paths being checked.

Thread Create		SUCCESS	Thread ID: 5980
RegOpenKey	HKLM\SOFTWARE\PHP\5.2.5\Per Directory Values	NAME NOT FOUND	Desired Access: Read
RegOpenKey	HKLM\SOFTWARE\PHP\5.2.5\Per Directory Values	NAME NOT FOUND	Desired Access: Read
RegOpenKey	HKLM\SOFTWARE\PHP\5.2\Per Directory Values	NAME NOT FOUND	Desired Access: Read
RegOpenKey	HKLM\SOFTWARE\PHP\5\Per Directory Values	NAME NOT FOUND	Desired Access: Read
RegOpenKey	HKLM\SOFTWARE\PHP\Per Directory Values	NAME NOT FOUND	Desired Access: Read

There is no such tree in the registry HKLM\SOFTWARE\PHP\


A diff of phpinfo output in the incorrect state, vs. the post-restarted state is:

< <tr><td class="e">include_path</td><td class="v">.;C:\Program&nbsp;Files\php\pear;C:\PROGRA~1\php\pear</td><td class="v">.;C:\Program&nbsp;Files\php\pear;C:\PROGRA~1\php\pear</td></tr>
---
> <tr><td class="e">include_path</td><td class="v">c:/Users/Tallyce/Documents/common-libraries/</td><td class="v">.;C:\Program&nbsp;Files\php\pear;C:\PROGRA~1\php\pear</td></tr>
190c190
< <tr><td class="e">REMOTE_PORT </td><td class="v">55768 </td></tr>
---
> <tr><td class="e">REMOTE_PORT </td><td class="v">55869 </td></tr>
215c215
< <tr><td class="e">Keep-Alive </td><td class="v">timeout=15, max=99 </td></tr>
---
> <tr><td class="e">Keep-Alive </td><td class="v">timeout=15, max=100 </td></tr>
348c348
< <tr><td class="e">mbstring.internal_encoding</td><td class="v"><i>no value</i></td><td class="v"><i>no value</i></td></tr>
---
> <tr><td class="e">mbstring.internal_encoding</td><td class="v">ISO-8859-1</td><td class="v"><i>no value</i></td></tr>
613c613
< <tr><td class="e">_SERVER["REMOTE_PORT"]</td><td class="v">55768</td></tr>
---
> <tr><td class="e">_SERVER["REMOTE_PORT"]</td><td class="v">55869</td></tr>
625c625
< <tr><td class="e">_SERVER["REQUEST_TIME"]</td><td class="v">1203417879</td></tr>
---
> <tr><td class="e">_SERVER["REQUEST_TIME"]</td><td class="v">1203418704</td></tr>
639c639



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-02-21 12:59 UTC] tallyce at gmail dot com
I'm pretty sure this is a duplicate of bug #43677.

The behaviour certainly fits with the comment at 7 Jan 10:57pm UTC there.
 [2008-02-24 00:21 UTC] jani@php.net
So let's make this bogus since there's already a report about the issue.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 22:01:26 2024 UTC