As like (i assume) many of you I am a PHP developer and have been using Joomla! for many of the sites we have been making for people and decided that to make it easier we are going to create a "core" folder for all of the sites that use Joomla!, that way when we update one site it updates them all.
I have finished the initial setup of the process, however joomla is using the file_exists() function, which does not check the INI setting "include_path", which the file does exist, just not within the directory the rest of the files are in.
In other words, I have the php.ini file's 'include_path' flag set to: "include_path:".

:\PHP_INCLUDES\" (windows) and everything works fine except in many of the files joomla uses if(file_exists(JPATH_ROOT.DS.'includes'.DS.'application.php')) or something similer to see if the file is actually there. This creates a problem for me because the strict path does not exist, however if you where to do require(JPATH_ROOT.DS.'includes'.DS.'application.php') the file would load because of the 'include_path' flag that I have set in the php.ini file.
My suggestion is to use a global function to substitute file_exists()... something like:
(taken from:
http://www.php.net/manual/en/function.f ... .php#92619, not sure if it even works, but I think you get the point)
Code:
<?php
/*
* Expanden file_exists function
* Searches in include_path
*/
function file_exists_ip($filename) {
if(function_exists("get_include_path")) {
$include_path = get_include_path();
} elseif(false !== ($ip = ini_get("include_path"))) {
$include_path = $ip;
} else {return false;}
if(false !== strpos($include_path, PATH_SEPARATOR)) {
if(false !== ($temp = explode(PATH_SEPARATOR, $include_path)) && count($temp) > 0) {
for($n = 0; $n < count($temp); $n++) {
if(false !== @file_exists($temp[$n] . $filename)) {
return true;
}
}
return false;
} else {return false;}
} elseif(!empty($include_path)) {
if(false !== @file_exists($include_path)) {
return true;
} else {return false;}
} else {return false;}
}
?>