404 page after upgrade |
Hi there,
I was using CI3 for a while, and recently I wanted to catch up with the latest update. I first upgraded to from 3.0.0 TO 3.0.1 and all went well. But from 3.0.1 to 3.0.2 throws a 404 page when accessing some controllers. I replaced system folder and constants.php. Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); The file controller is Biz.php On localhost I access the page with this link: http://localhost/ci/biz/privacy Code: $config['base_url'] = 'http://localhost/ci/'; routes Code: $route['biz/privacy']='biz/privacy'; And like I said, everything worked fine on 3.0.1 but same error 404 page with any version above that. Any help and suggestions will be much appreciated Thank you
When upgrading 3.0 to 3.1 you can just upgrade immediately to 3.1, then go through all the change logs to make sure all the instructions are followed. There is a lot of repeated info in there, so it really does not take very long at all.
One thing to check is that (I hope you made a backup) in your original index.php there were no additional configurations. Also did you upgrade the index.php file? I also presume you have not altered the system core files at all. From memory I think there were some changes to the config file too, so it might be worth comparing the latest version of the config file to your current version. Not a lot of help I know - sorry. Best wishes, Paul
At first, I upgraded straight to 3.1, and then I encountered this issue. I really can't see what was wrong, then I decided to go one version at time. 3.0.1 worked fine, but the rest don't.
I didn't do any changes to the core. 3.0.1 to 3.0.2 there is only system files and constants.php file. And still same issue
Try changing the Prtocol to one of the other.
PHP Code: $config['uri_protocol'] = 'PATH_INFO'; What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(08-21-2016, 04:01 PM)InsiteFX Wrote: Try changing the Prtocol to one of the other. I think the problem is around routes file. Here is a strange thing. The routes.php starts with: Code: $route['default_controller'] = "local/city"; So some routes don't work unless they right under the Scaffolding_Trigger or all the way up Code: $route['default_controller'] = "local/city"; Any reason this happening?
I am not sure if this is the solution, but it fixed my problem.
In the manual is states: "The reserved routes must come before any wildcard or regular expression routes." I put all routes with wildcards and regular expression last and worked fine again. Appreciated your help |
Welcome Guest, Not a member yet? Register Sign In |