I have a problem using Symfony2 on ISPconfig ubuntu server. Server uses multiple php versions and I use php 5.5.9 version for Symfony application. Application works fine, but when I log in, it randomly logs me out (especially when i refresh or move to another page). And also, sometimes it won't even let me log in; it redirects me back to the login page without authentication.
Thing is, the application works perfectly on a different Ubuntu server (not ispconfig). I made sure that ispconfig php.ini file and other configurations be set up correctly.
Do you have any ideas why I could be having login problems on ISPconfig?
I had a similar problem and I managed to solve it by adding: post_only: true
to my security.yml file under the firewalls section. So it looks like this now:
firewalls:
secured_area:
pattern: ^/
anonymous: ~
provider: chain_provider
form_login:
login_path: /login
check_path: /login_check
default_target_path: example_route
#remember_me: true
post_only: true
logout:
path: /logout
target: /
To be honest, I am not entirely sure why it worked, but I think this makes sure that login is requested only with POST method. Not to mention that I have a multi cluster setup, with different versions of php installation.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.