Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter with php5 - CI-generated 404 Error
#5

[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...


Messages In This Thread
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-02-2008, 05:11 PM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-02-2008, 07:51 PM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-03-2008, 12:33 AM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-03-2008, 12:42 AM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-03-2008, 12:52 AM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-03-2008, 01:09 AM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-03-2008, 05:00 AM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-03-2008, 07:59 AM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-03-2008, 10:12 AM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-03-2008, 10:14 AM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-03-2008, 10:16 AM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-03-2008, 10:31 AM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-03-2008, 10:38 AM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-04-2008, 09:28 AM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-05-2008, 01:04 PM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-05-2008, 01:08 PM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-05-2008, 01:11 PM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-05-2008, 01:14 PM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-05-2008, 01:20 PM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-05-2008, 01:25 PM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-05-2008, 01:29 PM
CodeIgniter with php5 - CI-generated 404 Error - by El Forum - 02-05-2008, 01:30 PM



Theme © iAndrew 2016 - Forum software by © MyBB