Reputation: 106
So as title suggests, session doesn't start after submitting a form. $_SESSION
is null after submitting. There are no errors, and redirect is to the page after successful login. I am pretty sure that is no related to any configuration problem in symfony, simply because I have exact copy on my local machine, and everything works fine.
That's why I think it's related with Apache 2.2. auto-session is off in php.ini
. Any suggestions?
Upvotes: 1
Views: 498
Reputation: 106
Actually all of that was because of Varnish. I didn't have Varnish for that project, at least I thought so, because I had configuration done wrong, and Varnish was working for both projects (that which I wanted, and which I don't). So I think the problems was with cached form (generally page). I think all of that, because recently I switched off Varnish, and everything working like it should.
Upvotes: 0
Reputation: 2829
You should use the Session Management of Symfony (http://symfony.com/doc/2.3/components/http_foundation/sessions.html)
As stated elsewhere, Symfony Sessions are designed to replace the use of PHP's native session_*() functions and use of the $_SESSION superglobal. Additionally, it is mandatory for Symfony to start the session.
(http://symfony.com/doc/current/components/http_foundation/session_php_bridge.html)
Upvotes: 2