Flourish PHP Unframework
This is an archived copy of the forum for reference purposes

Session is not destroyed when browser closes

posted by psylovibe 9 years ago

I would like my users to be signed out when they close their browser.

I set up the following code in init.php:

//fSession::setLength('1 day');
fSession::open();
//fCookie::set('asi_cookie', '0', 0, '/');

By default flourish should sign me out if browser closes unless I fSession::setLength().

I tried setting up the cookie also but it did not help.

Any idea?

By default the PHP session cookie is destroyed when the browser is closed and the file on the server is deleted after 24 minutes. It sounds to me like the session.cookie_lifetime ini setting has been changed from 0.

Flourish only changes this value if you pass two time lengths to fSession::setLength() and you call fSession::enablePersistence().

posted by wbond 9 years ago

I'm having the same issue as Theo above:

php.ini => session.cookie_lifetime = 0

Safari destroys the session but Firefox doesn't.

posted by punchfacechampion 8 years ago

Solved

I had to change the "when firefox starts" option in the "general" section from "open my windows and tabs from last time" to "show my home page" or "show a blank page."

For some reason, Firefox remembers the cookies when quitting if it's set to remember windows/tabs

posted by punchfacechampion 8 years ago