I'd like to set the PHP session lifetime as long as possible util the browser is closed, does it possible to implement this just by settings in PHP script, or settings in PHP.ini is required?
+1
A:
I just went through this myself recently.
Here is the website I used:
http://www.captain.at/howto-php-sessions.php
Pay attention to the "session.php" section at the bottom.
MrCarney
2010-09-14 02:37:21
Thanks, MrCarney!
James Tang
2010-09-14 02:43:41
A:
PHP's default session setting is to make the session cookies... session cookies. They'll last for the lifetime of the browser and get deleted when it's closed/quit/exited. The relevant .ini setting is session.cookie_lifetime
Marc B
2010-09-14 04:05:05