Page 1 of 1

Trying to use include_path without success

Posted: Wed Oct 29, 2008 1:32 pm
by atm
Hello there,

I have a library that I am hoping to use across several sites on my server.

phpinfo() reports:

Local Value Master Value
include_path .:/usr/share/php:/usr/share/pear .:/usr/share/php:/usr/share/pear


So to try the most basic include, I created:

test.php in /usr/share/php

Code: Select all

 
<?
echo "INCLUDED TEST";
?>
 
Then in my site, I created:

mytest.php

Code: Select all

 
<?
include ('test.php');
?>
 
Hoping this would go looking in my include path for the file but my result is this:

Code: Select all

 
<?
Warning: include(test.php) [function.include]: failed to open stream: No such file or directory in /home/mysite/public_html/temp/mytest.php on line 2
 
Warning: include() [function.include]: Failed opening 'test.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /home/mysite/public_html/temp/mytest.php on line 2
?>
 

What am I doing wrong?

Re: Trying to use include_path without success

Posted: Wed Oct 29, 2008 1:55 pm
by atm
Nevermind I found the include directory also must be in open_basedir

:drunk: