From:             tallyce at gmail dot com
Operating system: Vista
PHP version:      5.2.5
PHP Bug Type:     Apache2 related
Bug description:  include_path set in vhost reverts to php.ini default 
intermittently

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



-- 
Edit bug report at http://bugs.php.net/?id=44178&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44178&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44178&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44178&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44178&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=44178&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44178&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44178&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44178&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44178&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44178&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=44178&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=44178&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44178&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44178&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=44178&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44178&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44178&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44178&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44178&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44178&r=mysqlcfg

Reply via email to