tags:

views:

30

answers:

2

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
Thanks, MrCarney!
James Tang
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