I run the laravel application and save the session on redis. Each time I refresh the page, a new session is created (I see it with keys *), and the session cookie also changes accordingly.
- I checked the cookie expiration date and this is a valid future date.
- I run this on my localhost with
php -Sas well as on the CentOS server, the problem exists in both of them.
My session.php file:
return [
'driver' => env('SESSION_DRIVER', 'file'),
'lifetime' => 120,
'expire_on_close' => false,
'encrypt' => false,
'files' => storage_path('framework/sessions'),
'connection' => null,
'table' => 'sessions',
'lottery' => [2, 100],
'cookie' => 'session',
'path' => '/',
'domain' => null,
'secure' => false,
];
on.env, SESSION_DRIVER=redis
source
share