I'm working on setting up centOS using vagrant. I have loaded my current git repo (a Symfony project) into vagrant and am able to pull up the login screen of my project. So Apache and PHP appear to be working fine. I can load any public pages and also make AJAX requests to specific HTTP endpoints and get a successful response.
我正在努力使用vagrant建立centOS。我已将当前的git repo(一个Symfony项目)加载到vagrant中,并且能够拉出我项目的登录屏幕。所以Apache和PHP看起来运行正常。我可以加载任何公共页面,也可以向特定的HTTP端点发出AJAX请求并获得成功的响应。
The issue then arises when I try and login. The page just reloads instead of logging me in and doesn't display any error messages as to why it didn't. It's almost as if the POST isn't being sent to the form. I was able to see an ajax request successfully communicate with mysql so I know there is a connection established and Apache is able to make and respond to requests. The problem only seems to be when I have a form that POSTs from one page to another. I have checked all error logs (Apache and Symfony) and there is nothing regarding a failure.
当我尝试登录时会出现问题。页面只是重新加载而不是登录我,并没有显示任何错误消息,为什么它没有。这几乎就像POST没有被发送到表单一样。我能够看到一个ajax请求成功地与mysql通信,所以我知道已经建立了连接,Apache能够做出并响应请求。问题似乎只是当我有一个从一个页面POST到另一个页面的表单时。我检查了所有错误日志(Apache和Symfony),没有任何关于失败的信息。
Any ideas on what the issue could be?
关于问题可能是什么的任何想法?
2 个解决方案
#1
I had a similar problem a few times. Check if you are not having a redirection from http to https. For example if you make a POST on some url, then after redirection you end up with a GET request.
我有几次类似的问题。检查您是否没有从http重定向到https。例如,如果您在某个网址上发布了POST,那么在重定向后,您最终会得到一个GET请求。
#2
There ended up being a problem with FOSUserBundle and by upgrading it and fixing the config parameters it started to work again.
最终出现了FOSUserBundle的问题,通过升级和修复配置参数,它开始重新运行。
#1
I had a similar problem a few times. Check if you are not having a redirection from http to https. For example if you make a POST on some url, then after redirection you end up with a GET request.
我有几次类似的问题。检查您是否没有从http重定向到https。例如,如果您在某个网址上发布了POST,那么在重定向后,您最终会得到一个GET请求。
#2
There ended up being a problem with FOSUserBundle and by upgrading it and fixing the config parameters it started to work again.
最终出现了FOSUserBundle的问题,通过升级和修复配置参数,它开始重新运行。