Re: session expires on server side
| From: | Padraig Kitterick | Date: | Sat, 27 Apr 2002 17:44:16 +0000 |
| Subject: | Re: session expires on server side | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-94964@lists.php.net to get a copy of this message | ||
Aljosa Mohorovic wrote:
session cookie exists on client side and it is set to last 5 days. the problem is that after some time session data expires. cookie on client side exists ($PHPSESSID), but session data on server side does not exists. i think that the answer is something like: ini_set("session.cache_expire", "7200"); but i'm not sure. i need this fast, so thnx to anybody with a solution. Aljosa P.S. sorry for my bad english, here is the code: Not too sure. Try messing with session.gc_maxlifetime. According to the php manual, this sets the length of time (in secs) before session data is cleared with the garbage collection routine.Padraig
------------------------------------------------------------------ <?php $time = (60*60*24*5); ini_set("session.cache_expire", "7200"); $date = gmdate ("D, d M Y H:i:s") . " GMT"; header ("Date: " . $date); header ("Expires: " . $date); header ("Last-Modified: " . $date); header ("Pragma: no-cache"); header ("Cache-Control: no-cache"); session_set_cookie_params($time); ?> ------------------------------------------------------------------