Here's config/session.php:
return [
'driver' => 'file',
'files' => storage_path().'/framework/sessions',
];
My storage/framework/sessions have 755 permissions.
When I put these 2 line in my controller
Session::set('aa', 'bb');
dd(Session::get('aa'));
I receive expected "bb" output. But if I comment first line:
// Session::set('aa', 'bb');
dd(Session::get('aa'));
and refresh page, I still expecting "bb" but getting null.
Also, storage/framework/sessions is empty.
What should I do to make Session working?

storage/framework/sessions?755means only the owner can write to the directory. So for those permissions to work the owner most commonly should be the webserver user, which in general is something likewww-data,apache, etc, depending on what Linux distribution and HTTP server you're using.775instead777and session still does not work.cookieanddatabasedrivers, the same :/ this is weird.dd()interrupts the request lifecycle before the code responsible for actually storing the session data in the file can be executed. Try usingvar_dump()instead ofdd().