session expires on server side
| From: | Aljosa Mohorovic | Date: | Sat, 27 Apr 2002 18:00:55 +0000 |
| Subject: | session expires on server side | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-94920@lists.php.net to get a copy of this message | ||
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:
------------------------------------------------------------------
<?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);
?>
------------------------------------------------------------------