From: sam dot houlder at teleperfomance dot no
Operating system: Linux
PHP version: 4.3.3
PHP Bug Type: Session related
Bug description: Session lost, session.cookie.lifetime
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 bug report at http://bugs.php.net/?id=25465&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25465&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25465&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25465&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25465&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25465&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25465&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25465&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25465&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25465&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25465&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25465&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25465&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25465&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25465&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25465&r=gnused