iwind/rockmongo

Session timeout on login. Unexpected behavior.

Ovsyanka opened this issue · 5 comments

I plan to fix it by myself, so i interested in your requests.

Session timeout don't working as expected.
When you do this:
setcookie(session_name(), session_id(), time() + $timeout);
you change lifetime of cookie in browser, but not change lifetime of session files on server.
And when time come - session files become deleted and session become ended regardless of cookie lifetime.

I think, that adding session lifetime in config is a good idea.
It will be same for all users.
It is possible set personal settings of session lifetime for each user in config, but i don't think that it is needful.

Another setting i want to add is session files store path.
Here explanation of problem that could be fixed by this setting (see note one).
http://php.net/manual/en/session.configuration.php#ini.session.gc-maxlifetime

Hi,
Is there any update on this issue?

Hi, you can get my pull-request #102, that fixing it.

Cool, thank you.

Vote on this issue please #133

change session_start at the top of app/classes/BaseController.php

session_start([ 'cookie_lifetime' => 172800 ]);

172800 is two-days