I think that TOny quite explains this issue by even quoting from our fine manual.
While I agree with your feelings Derick about everything else in John's email, I am not sure the manual is clear here.
From his bug report, I changed wsfile.php to:
<?
$curdir = getcwd();
$include_path = ini_get('include_path');
$paths = explode(":", $include_path);
foreach($paths as $path){
if(empty($path)) continue;
echo "Is file found at $curdir/".$path.'/../inc/incfile.php ?';
if(file_exists("$curdir/".$path.'/../inc/incfile.php')){
echo " Yes!\n";
} else {
echo " No!\n";
}
}
include '../inc/incfile.php';
print "Hi! I'm wsfile!\n";
?>
I get:
Is file found at /home/brianm/public_html/./../inc/incfile.php ? No!
Is file found at /home/brianm/public_html//usr/local/lib/php/../inc/incfile.php ? No!
Is file found at /home/brianm/public_html//www/codelib/include/../inc/incfile.php ? No!
Is file found at /home/brianm/public_html/./ws/../inc/incfile.php ? Yes!
PHP ERROR (2)
Host: blm.dealnews.com
File: /home/brianm/public_html/ws/wsfile.php
Line: 21
Error: main(../inc/incfile.php) [<a
href='function.main'>function.main</a>]: failed to open
stream: No such file or directory
Url: http://blm.dealnews.com/~brianm/mainfile.php
PHP ERROR (2)
Host: blm.dealnews.com
File: /home/brianm/public_html/ws/wsfile.php
Line: 21
Error: main() [<a href='function.include'>function.include</a>]:
Failed opening '../inc/incfile.php' for inclusion
(include_path='.:/usr/local/lib/php:/www/codelib/include:./w
s:')
Url: http://blm.dealnews.com/~brianm/mainfile.php
Clearly the files is findable. And the manual does not explain why. It only states that the scripts dir will not be searched. But, it does not need to be for this unless I am missing something.