CakePHP Missing Controller - but it exists

alus

New Member
I recently downloaded cakephp-1.3.4. I set it up on my web server. I followed the advanced installation settings. My folder structure is as follows.\[code\]/common/ cakephp/ app/ etc.../htdoc/\[/code\]The \[code\]/htdoc\[/code\] folder is the webroot; \[code\]cakephp\[/code\] resides in the \[code\]common\[/code\] folder.I have configured the paths in index.php to point to this folder structure. I have the app up and running. I created a layout, the app has picked it up (along with all the css and images - all that works).I created a \[code\]posts_controller.php\[/code\] in \[code\]cakephp/app/controllers/\[/code\]. Now when I try to access the following page: http://localhost/posts. I get a message that the controller cannot be found and that I should create a \[code\]app/controllers/posts_controller.php\[/code\] (it already exists!).Also the strange thing is using the default pages_controller works. I created an about.ctp and dropped it in \[code\]app/views/pages/about.ctp\[/code\]. Vising http://localhost/pages/about shows up as expected.SOLUTION:Sam helped me solve this problem (see the long comment thread below). The problem was I had set relative paths for my ROOT folder. This messed things up. The solution is to either directly set an absolute path or call \[code\]realpath\[/code\] with your relative path for it to be resolved into the right absolute path.
 
Back
Top