[eluser]Eric Cope[/eluser]
I have pin pointed the exact point where the two different version diverge.
In Router.php;
Code:
function _get_uri_string()
{
if (strtoupper($this->config->item('uri_protocol')) == 'AUTO')
{
// If the URL has a question mark then it's simplest to just
// build the URI string from the zero index of the $_GET array.
// This avoids having to deal with $_SERVER variables, which
// can be unreliable in some environments
if (is_array($_GET) AND count($_GET) == 1)
{
// Note: Due to a bug in current() that affects some versions
// of PHP we can not pass function call directly into it
$keys = array_keys($_GET);
return current($keys);
}
// Is there a PATH_INFO variable?
// Note: some servers seem to have trouble with getenv() so we'll test it two ways
$path = (isset($_SERVER['PATH_INFO'])) ? $_SERVER['PATH_INFO'] : @getenv('PATH_INFO');
if ($path != '' AND $path != "/".SELF)
{
return $path;
}
// No PATH_INFO?... What about QUERY_STRING?
$path = (isset($_SERVER['QUERY_STRING'])) ? $_SERVER['QUERY_STRING'] : @getenv('QUERY_STRING');
if ($path != '')
{
return $path;
}
// No QUERY_STRING?... Maybe the ORIG_PATH_INFO variable exists?
$path = (isset($_SERVER['ORIG_PATH_INFO'])) ? $_SERVER['ORIG_PATH_INFO'] : @getenv('ORIG_PATH_INFO');
if ($path != '' AND $path != "/".SELF)
{
return $path;
}
// We've exhausted all our options...
return '';
}
You may see $_SERVER['ORIG_PATH_INFO']. This does not exist for the php4 scenario. Additionally, @getenv('ORIG_PATH_INFO') returns false.
However, when that line is inserted into the .htaccess file, it does exist and matches the getenv and is 'admin/index.php'. It looks like it compares itself against SELF. However, SELF is only the file name, not a partial path, like what I am dealing with...
This path is returned and all hell is broken loose.
stay tuned...