|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-10-14 22:06 UTC] gabe at mudbuginfo dot com
[2004-10-14 22:22 UTC] gabe at mudbuginfo dot com
[2004-11-27 16:46 UTC] tony2001@php.net
[2004-12-02 16:07 UTC] gabe at mudbuginfo dot com
[2004-12-02 16:12 UTC] tony2001@php.net
[2005-04-05 17:13 UTC] vrana@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 12 16:00:01 2025 UTC |
Description: ------------ This site prepends the full path to the site's directory for site-specific include files with the following code in the file /files/client/ global_fellowship_search/proto1/include/init.php $site_include_path = dirname(__FILE__); $sys_include_path = ini_get('include_path'); ini_set('include_path', $site_include_path . ':' . $sys_include_path); which creates an include path of '/files/ client/global_fellowship_search/proto1/include:.:/usr/ local/lib/php:/usr/local/lib/mis:/usr/local/lib/ eclipse' When attempting to include the file /files/ client/global_fellowship_search/proto1/mail/ forgot_pass.mail relative to the site's prepended include directory with "include_once '../mail/ forgot_pass.mail';", PHP fails to find the file. Supplying an absolute path to the file works. It just seems like PHP will not respect crawling up a '..' parent directory link for any path within the include_path except for '.' Note that this code was placed in the 'index2.php' file just for simplicity in demonstration; in implementation this inclusion code is held within another file in the include/ directory which is included several different directory levels. Reproduce code: --------------- (Within /files/client/ global_fellowship_search/proto1/index2.php) include_once '../mail/forgot_pass.mail'; Expected result: ---------------- Inclusion of /files/client/ global_fellowship_search/proto1/mail/forgot_pass.mail Actual result: -------------- Warning: main(../mail/forgot_pass.mail): failed to open stream: No such file or directory in /files/client/ global_fellowship_search/proto1/index2.php on line 5 Warning: main(): Failed opening '../mail/ forgot_pass.mail' for inclusion (include_path='/files/ client/global_fellowship_search/proto1/include:.:/usr/ local/lib/php:/usr/local/lib/mis:/usr/local/lib/ eclipse') in /files/client/global_fellowship_search/ proto1/index2.php on line 5