|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15374 include_path loses value when executed
Submitted: 2002-02-04 21:06 UTC Modified: 2002-09-11 01:00 UTC
Avg. Score:4.2 ± 0.9
Reproduced:11 of 11 (100.0%)
Same Version:1 (9.1%)
Same OS:4 (36.4%)
From: aaron dot hawley at uvm dot edu Assigned:
Status: No Feedback Package: PHP options/info functions
PHP Version: 4.2.1 OS: Solaris 8
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.
Block user comment
Status: Assign to:
Bug Type:
From: aaron dot hawley at uvm dot edu
New email:
PHP Version: OS:


 [2002-02-04 21:06 UTC] aaron dot hawley at uvm dot edu
we built today and are still having problems with the include_path.  it seems to occasionally null out, but can work everytime by putting :

ini_set('include_path', ini_get('include_path'));

before including anything found in the include_path.

this has been happening since 4.0.6, if not earlier.  Apache 1.3.20

more info:



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-09 22:11 UTC]
I've seen this bug come up once and a while. It seemed to be to happen on the first request to each server process, so if apache keeps children around a long time, it almost never happens. But if max_request_per_child (or whatever) is set lower, it seems to happen more frequently. [ this purely from memory, i will try to duplicate this ... ]
 [2002-07-16 09:28 UTC]
Just as a note. This still happens with:
Solaris 8 (SunOS 5.8)

It's fairly infrequent, but still occasionally get:

Warning: Unable to access PEAR.php in foo.php on line 42
Fatal error: Failed opening required 'PEAR.php'
(include_path='') in foo.php on line 42

As Aaron suggested, adding this code fixes it:
ini_set('include_path', ini_get('include_path'));
 [2002-07-16 14:17 UTC]
Wierd..never noticed this before. Does it happen with this
 [2002-07-19 15:51 UTC] aaron dot hawley at uvm dot edu
that snapshot seems to require absolute pathnames, or atleast rejust relative paths?

i haven't noticed a warning being generated.  but this is on our non-production and "less stressed" test web server.
 [2002-08-08 09:16 UTC] aaron dot hawley at uvm dot edu
here is more information on that snapshot we installed; in particular the requirement of absolute paths.  it seems to not drop the 'include_path' information - which is good, but it also doesn't seem to use the value either.

Warning: main("Class.php") - No such file or directory in /usr/local/http-data/htdocs/foo/foo.php on line 2

Fatal error: Failed opening required 'Class.php' (include_path='.:/usr/local/lib/php') in /usr/local/http-data/htdocs/foo/foo.php on line 2
 [2002-08-08 14:34 UTC] aaron dot hawley at uvm dot edu
php4-STABLE-latest.tar.gz > 08-Aug-2002 09:02   3.3M

still appears that the include_path value doesn't get dropped, but it also doesn't get used.
 [2002-08-10 09:37 UTC]
Any chance you can try the non-stable, development branch of this?  
 [2002-09-11 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2003-01-10 12:56 UTC] patrick dot greer at charter dot net
I am experiencing the same issue with my hosting provider! Plaform is:
* FreeBSD 4.6-STABLE
* Apache/1.3.27 (Unix) FrontPage/ mod_ssl/2.8.11         OpenSSL/0.9.6a
* PHP 4.2.3

I have to do the ini_set('include_path', ini_get('include_path')); trick to pick up any PEAR classes.

It seems, however, that if I set the include_path in an .htaccess directive, the problem completely goes away...

If I can help diagnose this, I'd be happy to.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 28 07:01:29 2024 UTC