Hello,
I'm experiencing a problem where basic PHP include/require fails for any paths that have more than 2 directory components.
First I try in php.ini:
include_path = "/usr/php_inc:."
And i make the file "/usr/php_inc/included.php" and put some dummy lines there.
Then, I restart Apache and do:
include 'included.php' // in file: http://localhost/test.php
and it works fine.
Then I change include_path:
include_path = "/usr/php_inc/sub_dir:."
and move "included.php" into "sub_dir". Restart Apache and re-run the simple test script. This time... I get:
Warning: include(included.php) [function.include]: failed to open stream: No such file or directory in /var/www/test.php on line 5
The only difference is that the include path is one step deeper.
I've been trying this in several different dirs and the result is always the same: If one of the paths in include_path is deeper than two dirs, include/require fails.
I also see the correct include_path when I do phpinfo().
This seems so peculiar so I doubt that it's a PHP bug.
Any ideas what is going wrong here?
My system setup: Ubuntu 8.4, Apache 2.0, PHP 5.2.3.
Any help appreciated.
Regards
// Arne S.