I had a problem with set_include_path, I read a lot of posts about this problem, but no one works for me. I am on Debian and my root directory will be installed in / home / project /
So, I tried these 4 different things:
ini_set("include_path", '/home/project'); ini_set("include_path", '.:/home/project'); set_include_path('.:/home/project'); set_include_path('/home/project'); set_include_path(get_include_path().PATH_SEPARATOR.'/home/project');
But nobody works ... when I do echo get_include_path (); it seems good every time.
But the fourth method works fine with WAMP on my computer.
Error message for ALL of them:
Warning: include(/config/config.php) [function.include]: failed to open stream: No such file or directory in /home/project/web/www.project.com/index.php on line 3 Warning: include() [function.include]: Failed opening '/config/config.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear:/home/project') in /home/project/web/www.project.com/index.php on line 3
source share