CakePHP: Session value is favicon.ico, Why?
Posted on June 28th, 2010 in Web Development | No Comments »
It was time to give CakePHPs Auth component a little test drive. Thinking I followed the manual to the key, there was no way I missed a step. I mean, there isn’t really much to do to set up simple authentication using CakePHP right? Well, for some reason after logging in I would get pushed to http://localhost:8888/users/favicon.ico:
Anyway, googling, asking for help on #cakephp didn’t really help as the problem was so stupid, not many people have had this problem. I stumbled across this post on the CakePHP google group.
Basically – “make sure the link to favicon.ico is root-relative (/favicon.ico). Otherwise the server’s looking for /controller/action/favicon.ico and the broken link gets captured as the current page. Same thing for your css and js.” – Chris Cassell
(Thank you sir!)