I built my first app with Cake, and everything went great until I uploaded it.
I have Cake, including the app folder, inside of a subdirectory of my root. I'm not sure if I needed to do anything else to configure the setup, or even if this has anything to do with the error.
On my local server, auth works fine and I'm able to login without issue. I uploaded the site to webfaction, though, and now when I log in, nothing happens, the page just reloads and if I debug auth, I can see that the form successfully submits to it the username and password, but I get no error messages from php, no "invalid password" error, the page just reloads.
I'm not even sure where to start looking to debug it. Any pointers?
asked Apr 08 '12 at 22:34
Ok, I've narrowed this down to a PHP 5.4 problem.
I went through the entire blog and auth tutorials using PHP 5.4, and had the same problem as you. Everything works except for authentication, and my login form displayed the "
I then took the same steps using a PHP 5.3 app, and had no problems - everything works, including authentication.
I think the strict mode errors might be significant in this case (contrary to earlier statements), mainly because
If you're set on using PHP 5.4, then try updating your code with whatever changes are needed to resolve the errors. I just checked in the #cakephp IRC channel on Freenode and was told "your APP/Model/User.php seems to only define beforeSave(), it wants beforeSave($options = array())". I changed my
... and that resolved the error and I was able to authenticate. Based on the errors I see on your site, you might need to update other parts of your code to get everything working.
If you're not set on PHP 5.4, then try using a PHP 5.3 app - based on my own tests, that should get you up and running.
Hope that helps!
This answer is marked "community wiki".