0

Are their any common reasons as to why CAKE would throw its specific errors at me if all file paths and naming conventions were correct?

My errors are as follows:

Error: The view for UsersController::login() was not found. Error: Confirm you have created the file: /Users/bellis/workspace/cake/app/View/Users/login.ctp

This file is created, and through my terminal is I 'pwd' I get:

ss-mac-301:User bellis$ pwd /Users/bellis/workspace/cake/app/View/Users

Are their any reasons why I would be getting this error? I tried permissions but that doesn't seem to be the case.

2 Answers 2

2

It's definitely either permissions or a missing file.

Missing file?

echo "Hi" > /Users/bellis/workspace/cake/app/View/Users/login.ctp

Bad permissions?

You'll probably want to make sure that your web server is able to at least read every directory between / and /Users/bellis/workspace/cake/app/View/Users/. This can be achieved with either very casual "owner, group and everyone can read" (plus list directory contents), or more fine-grained "owner and group can read, write (and list directory contents); everyone else stays out".

Your home folder /Users/bellis/ should typically not have "everyone may read" enabled (for obvious security reasons).

I recommend moving your project out to /var/www/my_project/ and setting permissions for those 3 levels of "service folders" rather than any number of "user private folders". If you like convenience, you can then make a symbolic link somewhere within your home folder: ln -s /var/www/my_project /Users/bellis/my_project

1
  • I don't know what it was, in the end I also figured I had named something wrong..probably a syntax issue somewhere. I recreated the files...and it works now. Weird. I will mark this as correct though since it was the logical steps to check.
    – lockdown
    May 31, 2012 at 22:15
0

Just going to post this here if any other people are having issues with this (who maybe like me are a beginner with CakePHP).

I turned out to had placed my view files within app/View/layouts/ rather then straight in app/View/, stupid mistake and sometimes hard to notice, easy to fix though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.