View Full Version : session id in a long life cookie

01-24-2007, 02:23 AM
Okay, my session's cookie is by default set to destroy on session closure. I want to make this cookie last 30 days. the only way I came up with is to put:


before every time I say session_start(). Is there an easier way to do this? something that I can do only once?

01-24-2007, 02:33 AM
session.cookie_lifetime can also be set in php.ini or a .htaccess file.

The session cookie lifetime is only one part of how long a session is kept. The session garbage collection settings control the lifetime of the session data file on the server.

01-24-2007, 02:38 AM
okay, that answered enough of my questions. Thanks alot.