My php session with Symfony 4.0 expire too soon even if I set it up for several days in config/packages/framework.yaml
.
framework:
{...}
session:
handler_id: ~
cookie_lifetime: 604800
{...}
When the user complete the signin process, he can navigate on the website and, if he return after few minutes, he doesn't need to signin again.
But if he return after 1 or 2 hours (don't know precisely) the session is expired and he must sign in again.
One of the solution that seems worked, was to change what you see above in:
handler_id: session.handler.native_file
save_path: "%kernel.root_dir%/sessions"
cookie_lifetime: 604800
Unfortunately that solution solved the problem in the dev environment, but crashed the app once that I pulled the code on the server.