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

[eluser]etheon[/eluser]
I had the same problem. When migrating to PHP5, the default route seemed to be ignored completely and I always had a 404 error.

However, I fixed it by editing the system/libraries/URI.php file (as much as I loathe editing the core files). Starts roughly at line 91.

Code:
// 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 != '/' AND $path != "/".SELF AND $path != "/index.php/")
{
      $this->uri_string = $path;
      return;
}

Added [$path != "/index.php/"], which was what ORIG_PATH_INFO was giving me (I'm hosted on asmallorange.com for the record).

I figured that, if it did not have to check the default route, it'd use PATH_INFO, which is also set on the server (but gave "/" without any explicit controller and thus was ignored).


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