Welcome Guest, Not a member yet? Register   Sign In
Routing Issue - Windows vs Linux
#1

(This post was last modified: 09-30-2016, 12:32 PM by krishg.)

I am migrating from CI 2.x to 3.0. I tested the migrated code on my Windows machine and it works fine.

I am testing now on AWS Linux box and stuff is breaking.

Getting 404s on my home page. The 404 message is The requested page ,, was not found

To debug, I dumped the my_router object from Codeigniter.php after the load class 
Code:
$RTR =& load_class('Router', 'core', isset($routing) ? $routing : NULL);
echo '<pre>';
print_r($RTR);

Here are some snippets from the dump 
Non working machine - AWS Linux
MY_Router Object
[module] => pages
[config] => CI_Config Object

          ... identical between the 2 machines
[routes]
         ... identical between two machines 
Code:
[routes] => Array
       (
           [about-us] => pages/view/about-us
           [our-mission] => pages/view/our-mission
           [404_override] => pages/view
           [404] => index/page_404
           [events/view/(.+)] => index/page_404
           [venues/view/(.+)] => index/page_404
           [artists/view/(.+)] => index/page_404
           [event/([a-zA-Z0-9_-]+)] => index/page_404
           [event/([a-zA-Z0-9_-]+)/([a-zA-Z_-]+)] => index/page_404
           [event/([a-zA-Z0-9_-]+)/([a-zA-Z_-]+)/([a-zA-Z_-]+)] => index/page_404
           [event/([a-zA-Z0-9_-]+)/([a-zA-Z_-]+)/([a-zA-Z_-]+)/([0-9])] => index/page_404
           [venue/([a-zA-Z0-9_-]+)] => index/page_404
           [venue/([a-zA-Z0-9_-]+)/([0-9])] => index/page_404
           [event/(.+)] => events/view/$1
           [artist/(.+)] => artists/view/$1
           [venue/(.+)] => venues/view/$1
           [admin] => admin
           [admin/change-password] => admin/change-password
           [admin/update-maintenance-mode] => admin/views/update-maintenance-mode
           [admin/([a-zA-Z_-]+)] => $1/admin/index
           [admin/([a-zA-Z_-]+)/(.+)] => $1/admin/$2
           [admin/([a-zA-Z_-]+)/(.+)/(.+)] => $1/admin/$2/$3
       )

[class] =>                          Note: (empty) --> Not sure why!
[method]=>index
[directory]=>../modules/pages/controllers
[default_controller] => index
On a Windows machine where the migrated solution works correctly, the MY_ROUTER dump snippet is

[module]=> index
[class] => index
[method]= index
[directory] ../modules/index/controllers/
[default_controller] => index/index

I am puzzled as to why the pages module is being loaded on the Linux machine first whereas the index module is being loaded first on Windows machine . Also the default controller is different. I copied the exact set of files from the Windows machine to linux box. PHP version on AWS is 5.6.25 and 5.6.22 on Windows.

Comparing logs between machines the Index MX_controller class never seems to be get initialized in the Linux machine. 

I wonder if this is a case sensitive issue

Any pointers appreciated.
Reply


Messages In This Thread
Routing Issue - Windows vs Linux - by krishg - 09-29-2016, 03:24 PM
RE: Routing Issue - Windows vs Linux - by krishg - 09-30-2016, 04:47 PM
RE: Routing Issue - Windows vs Linux - by Narf - 10-03-2016, 12:48 AM
RE: Routing Issue - Windows vs Linux - by krishg - 10-03-2016, 08:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB