I have a file called abc.php, which also includes another file called xyz.php. Both files are in the same folder
The include statement inside abc.php looks like:
<? include 'xyz.php' ?>
Everything works fine as far as other modules in the same foler calling any of the abc.php functions (some of which depend upon the xyz.php functions, hence the include).
But when I drop down a folder level to another folder, where some module calls to abc.php, the interpreter reports an error, saying something like:
"open_basedir restriction in effect. File is in wrong directory. in /usr/local/xxx/xxx/xxx/xx.com/httpdocs/xxx/abc.php3 on line 4"
This is even after I have instructed the module that the file to be included is up one folder level as :
<? include '../abc.php3' ?>
However, when I copy both the abc.php and the xyz.php files to whatever lower level folder needs it, all works fine. But that is not acceptable for obvious reasons.
I have also checked "xyz.php" to make sure that it is not also calling to some other function in some other folder. xyz.php makes no calls to anyone, only returns values from its various functions.
Bottom line is, why is including one file in another not specific enough when changing folders? Why can't UNIX find this included xyz.php file? Isn't there suppose to be a "path" command for UNIX, similar to DOS, so it can find these files wherever they are?