I’m new to cakephp and I’m having some problems with setting up a local development server. I have my cake install located at http://localhost/dropbox/my_site/. However, when I try to visit that url, it tells me the dropbox controller isn’t set up. How do I tell CakePHP to start in my_site rather than /localhost/?
I’ve tried adding connect(/localhost/dropbox/*) to the routes, but it seems like it still looks for models in the wrong location.
I tried editing index.php in app/webroot but all the examples show how to write the directory in linux format rather than windows, so I’m not sure how to structure ‘ROOT’
CakePHP will work happily in a subdirectory – I have several Cake sites running at http://localhost/{appname} on my dev machine.
Cake defines its ROOT directory in the root index.php file. If you look inside you’ll see the following lines:
Since it’s taking ROOT from
dirname(__FILE__), it will always point to that file’s location.I suspect you have problems in your routing file. Did you create any custom routing rules to account for being located in a subdirectory? If you did, your cake install may be trying to access http://localhost/dropbox/my_site/dropbox/… and that’s why you’re getting that error.