I’ve set up Symfony authentication on my local dev server, it works perfectly in both prod and dev environments, today I registered a domain for testing and pushed my code up to an AWS EC2 server, I can get to the login page no problems but as soon as I try to login I get redirected straight back to the login page without any error. It seems as though when it is submitting to login_check it redirects straight back to /login. I’ve tried clearing and warming the production cache with and without debug, which doesn’t seem to solve the problem. There are no errors in my prod.log file.
Any suggestions on how to troubleshoot?
Thank you.
Edit:
This is showing up in the dev log:
[2012-03-26 22:52:59] security.INFO: Authentication request failed: Your session has timed-out, or you have disabled cookies. [] []
[2012-03-26 22:52:59] security.DEBUG: Redirecting to /login [] []
Edit
Every time I refresh the page I get two new cookies sub.domain.com and .domain.com — If i look on the server in the /tmp/ dir where the sessions are saved, 6 new sessions are created on each page refresh, the two that are shown in chrome dev tools both have no data inside them. This problem does not exist on my local dev server. Any suggestions on what could be causing this appreciated!!!
Edit — Resolution
I deleted the cookies from Chrome and it suddenly started working. Not sure what the root of the problem was but all seems to be working just fine now.
Well, it works on your local server so you definitely have cookies enabled. 🙂
As I said in the comment you should check if session was setup properly in
php.ini. This includes, among others:Also, check in
Firebugthat you have received validPHPSESSIDcookie (or anything similar, depending on youphp.ini). Another thing you might want to check isconfig.ymlfile for part like this:These are all wild guesses but I suspect that “session.save_path” is not writable in your filesystem…