Symfony的认证 - 不能让在过去生产的登录页面 [英] Symfony authentication - can't get past login page in production

查看:174
本文介绍了Symfony的认证 - 不能让在过去生产的登录页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在这两个督促和开发环境上设置的Symfony验证我的本地开发服务器上,它完美的作品,今天我注册了一个测试域,把我的code至一个AWS EC2服务器,我可以得到登录页面没有问题,但是当我尝试登录我重定向直接回到登录页面没有任何错误。它好像当它被提交给login_check它重定向直接回/登录。我试过清算和有和没有调试,这似乎并没有解决问题的升温生产缓存。有我在prod.log文件中没有错误。

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.

如何解决有什么建议?

感谢您。

编辑:
这显示了在开发日志:

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 [] []

修改
我每次刷新页面,我得到了两个新的饼干sub.domain.com和.domain.com - 如果我看到那里的会话保存在/ tmp /目录服务器上,6个新的会话在每个页面刷新创建,这在Chrome浏览器开发工具都显示两人都在他们里面没有数据。此问题不我的本地开发服务器上。关于这可能是造成该AP preciated任何建议!

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!!!

编辑 - 分辨率

我删除了Chrome浏览器的cookie,它突然开始工作。不知道问题的根源是,但一切似乎是现在的工作就好了。

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.

推荐答案

那么,它的工作原理在本地服务器上,所以你肯定有启用Cookie。 :)

Well, it works on your local server so you definitely have cookies enabled. :)

正如我在评论说,你应该检查,如果会议是正确安装在的php.ini 。这包括但不限于:

As I said in the comment you should check if session was setup properly in php.ini. This includes, among others:


  • session.save_path的

  • session.auto_start。

另外,请检查萤火虫您已经收到有效的 PHPSESSID 饼干(或任何类似,这取决于你的php.ini )。你可能想另一件事是检查 config.yml 文件这样的部分:

Also, check in Firebug that you have received valid PHPSESSID cookie (or anything similar, depending on you php.ini). Another thing you might want to check is config.yml file for part like this:

session:
        default_locale: %locale%
        auto_start:     true
        lifetime:       86400

这些都是胡乱猜测,但我怀疑的session.save_path无法写入在你的文件系统...

These are all wild guesses but I suspect that "session.save_path" is not writable in your filesystem...

这篇关于Symfony的认证 - 不能让在过去生产的登录页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆