How to increase the session timeout in Symfony

Rui Gonçalves picture Rui Gonçalves · Mar 2, 2010 · Viewed 18.8k times · Source

I would like to know how to increase the session timeout in symfony. Is it enough to only adjust the symfony configuration settings or must I also configure anything in my php.ini file?

Answer

greg picture greg · Jul 9, 2012

For Symfony 2.0.x

framework:
    session:
        lifetime: 43200  #time in seconds

For Symfony >= 2.1.0

framework:
    session:
        cookie_lifetime: 43200  #time in seconds