Welcome Guest, Not a member yet? Register   Sign In
[Session] Session IDs do not match
#1

Suppose I have the following code:
PHP Code:
$session session();
log_message('debug','Session ID: '.session_id());
log_message('debug','Session array: '.var_export($_SESSION,TRUE)); 
 This is after the first call to the php (after a session ID has been renewed) sometimes the output:

DEBUG - 2020-09-05 12:34:36 --> Session ID: 528172rok6phf1ttgu9ucvl3f4pkcqjj
DEBUG - 2020-09-05 12:34:36 --> Session array: array (
  '__ci_last_regenerate' => 1599302009,
  'user_language' => 'de',
  '_ci_previous_url' =>'http://.....',
)
DEBUG - 2020-09-05 12:34:36 --> Session: CodeIgniter\Session\Session::__set_state(array(
  'driver' =>
  CodeIgniter\Session\Handlers\FileHandler::__set_state(array(
    'savePath' => '...',
    'fileHandle' => NULL,
    'filePath' => '...',
    'fileNew' => false,
    'matchIP' => false,
    'fingerprint' => 'd41d8cd98f00b204e9800998ecf8427e',
    'lock' => false,
    'cookiePrefix' => '',
    'cookieDomain' => '',
    'cookiePath' => '/',
    'cookieSecure' => false,
    'cookieName' => 'ci_session',
    'sessionID' => '4gtbbgdn3ig0kcu7ejhee49jil9mhujk',

The lower session ID (sessionID 4gt...) seems to be an older session ID.
Does anybody know why I get two different session IDs?

After the next call the IDs match.
Reply


Messages In This Thread
[Session] Session IDs do not match - by HardyW - 09-05-2020, 03:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB