#15374 [Com]: include_path loses value when executed

From: Date: Thu, 08 Aug 2002 13:16:19 +0000
Subject: #15374 [Com]: include_path loses value when executed
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-16262@lists.php.net to get a copy of this message
ID: 15374 Comment by: aaron.hawley@uvm.edu Reported By: aaron.hawley@uvm.edu Status: Feedback Bug Type: PHP options/info functions Operating System: Solaris 8 PHP Version: 4.2.1 New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [2002-07-19 15:51:25] aaron.hawley@uvm.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-07-16 14:17:59] sniper@php.net Wierd..never noticed this before. Does it happen with this snapshot: http://snaps.php.net/php4-latest.tar.gz ------------------------------------------------------------------------ [2002-07-16 09:28:34] jflemer@php.net Just as a note. This still happens with: Apache-1.3.26 PHP-4.2.1 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-02-09 22:11:29] jflemer@php.net 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-02-04 21:06:39] aaron.hawley@uvm.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: http://www.uvm.edu/phpinfo.php http://www.uvm.edu:8888/www/bug-11006.php http://www.uvm.edu:8888/www/bug-11006.phps aaron ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15374&edit=1

« previous php.bugs (#16262) next »