• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Customs routes no longer working (possibly php 5.4 issue) (CI 2.1.3)

#1
[eluser]jelatin[/eluser]
Alright, my application has been running fine for a few months now. Starting this morning all of my custom routes no longer work.

Have a controller named 'stuff' in a folder named 'mL'. Set up a custom route:

Code:
$route['default_controller'] = "mL/stuff";

Then visit 'website.com/', works fine, gets me to the 'controllers/mL/stuff' controller. Now, if I try to use a custom route:

Code:
$route['stuff'] = "mL/stuff";

and visit 'website.com/stuff' I get sent to my 404 page (as set in $route['404_override']).

This is true of all of my controllers, if I set it as the default_controller it works without issue. Someone else upgraded the server to php 5.4.9 over the weekend, and it's the only thing I can think of that might affect this, but I can't figure out how/why.

#2
[eluser]Aken[/eluser]
Do you have another route that's catching it first? Routes are fired in order from top to bottom, and once one matches, it stops there. Might help to comment out everything except the one you're testing.

Otherwise /system/core/CodeIgniter.php is the file that does the main logic. Look through it and debug and figure out what's weird.

#3
[eluser]jelatin[/eluser]
It ended up requiring a change to the .htaccess which has been unaltered for months.

I changed

Code:
RewriteRule ^(.*)$ /mL/$1 [L]

to

Code:
RewriteRule ^(.*)$ /mL/index.php/$1 [L]

and it worked fine in PHP 5.4. No idea why.

#4
[eluser]Aken[/eluser]
Is your CI install inside the mL folder? If so, why is mL also in your routes?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.