#25465 [Opn]: Session lost, session.cookie.lifetime

From: Date: Wed, 10 Sep 2003 07:11:38 +0000
Subject: #25465 [Opn]: Session lost, session.cookie.lifetime
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-47365@lists.php.net to get a copy of this message
ID: 25465 User updated by: sam dot houlder at teleperfomance dot no Reported By: sam dot houlder at teleperfomance dot no Status: Open Bug Type: Session related Operating System: Linux PHP Version: 4.3.3 New Comment: Corrected file1.php remove $_SESSION[counter] ... Previous Comments: ------------------------------------------------------------------------ [2003-09-10 03:10:02] sam dot houlder at teleperfomance dot no Description: ------------ Client looses session cookie if client time + cookie lifetime > server time. Does cookie get timestamp from server? Reproduce code: --------------- File1 : <?php ini_set('session.cookie_lifetime', '60'); session_start(); $_SESSION[counter]=$_SESSION[counter]+1; $_SESSION[s_logon]='Logged in'; echo "<META HTTP-EQUIV=Refresh CONTENT=\"3; URL=file2.php\">"; echo "This is file1.php<br>"; echo "Session logon: $_SESSION[logon]<br>"; ?> File2: <?php session_start(); echo "<META HTTP-EQUIV=Refresh CONTENT=\"3; URL=file1.php\">"; echo "This is file2.php<br>"; echo "Session logon: $_SESSION[s_logon]<br>"; unset($_SESSION[s_logon]); ?> Expected result: ---------------- If script file1.php i started, $_SESSION[logon] will display in file 2, IF client time + session.cookie.lifetime < server time. I would have expected the cookie timestamp to origin from client time and not server time. Actual result: -------------- if client time+cookie.lifetime<server time fil1.php: fil2.php: This is file2.php Session logon: Logged in if client time+cookie.lifetime>server time fil1.php: This is file1.php Session logon: file2.php: This is file2.php Session logon: ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25465&edit=1

« previous php.bugs (#47365) next »