Forum Moderators: coopster
I have a problem where the include_path I modify with the following code fails but only on the live server all works fine on my FC8 Apache testing server.
ini_set('include_path', ini_get('include_path') . $sep . $doc_root . '/common-include');
Warning: include(site_bar.php) [function.include]: failed to open stream: No such file or directory in /home/3/d/mysite/www/dev/dh/index.php on line 8
I have checked. The dir exists and the file exists. If I add the relative path to the include statement then it finds the file.
This works fine.
include "common-include/header.php";
This fails
$sep = PATH_SEPARATOR;
$doc_root = $_SERVER['DOCUMENT_ROOT'];
ini_set('include_path', ini_get('include_path') . $sep . $doc_root . '/common-include');
include "site_bar.php";
As this works fine on the testing server I assume it must be a permissions problem.
Does the .htaccess file have any effect here, if so what would I need to gain access to the dir's.
Any other ideas.
Thanks for taking the time to read this.
Dave