Link to home
Start Free TrialLog in
Avatar of RunForrestRun
RunForrestRunFlag for United States of America

asked on

CakePHP 2.4 Missing Controller/ Routing Issue/HTACCESS

I am having some issues deploying my site live. The site works perfectly fine on my local machine, but when I deployed it an tried to navigate to some areas of the site I get missing controller errors. My web application has a AuthACL plugin, and I use it to handle login and permissions throughout the site. This part of the application functions with no problem on the live site, but when I click on other links that take me outside of the plugins MVC....I get the missing controller error. I'm not the best when it comes to routing so I need some input from someone who can point me in the right direction. Here is what my current route file look like....As you can see the first statement is for the plugin...no problem. But Im not sure how to alter this in order for my application to function properly. My directory looks like this....

    /newsite
 
     /app
    /Config
    /Console
    ...
    /webroot
        /files
    /lib
    /plugins
    /vendors


          Router::connect('/', array('plugin' => 'AuthAcl', 'controller' =>     'users', 'action' => 'login', 'home'));
    /**
     * ...and connect the rest of 'Pages' controller's urls.
     */
               Router::connect('/pages/*', array('controller' => 'pages'
      , 'action'   =>  'display'));

    /**
     * Load all plugin routes. See the CakePlugin documentation on
    * how to customize the loading of plugin routes.
    */
      CakePlugin::routes();

    /**
     * Load the CakePHP default routes. Only remove this if you do not want to use
     * the built-in default routes.
     */
      require CAKE . 'Config' . DS . 'routes.php';


Again when I try to access my controller it says they are missing but they are in the right location. Or is this an htaccess issue? Any input would be greatly appreciated! I kinda botched an application release!
Avatar of Scott Madeira
Scott Madeira
Flag of United States of America image

I don't have a lot of Cake experience but I have found that sometimes it is a matter of case.  If you develop and test on a windows box the case of the controllers and routes doesn't matter but as soon as you deploy to a linux environment things will blow up if there is a case mis-match between controller and method names and route files, etc.  This bit me once or twice with Laravel development.
ASKER CERTIFIED SOLUTION
Avatar of RunForrestRun
RunForrestRun
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of RunForrestRun

ASKER

We thought that it was a server issue until we checked the URL that was generated. It was trying to access a local link  on the client machine that obviously didn't exist.