I am really pounding my head on the desk about this:
I am saving session data on page1.
here is the initial code:
<?php
session_start();
$SID = session_id();
$newToken = md5(uniqid(mt_rand(), true));
$_SESSION['donate-token'] = $newToken;
I did a var dump at the bottom of page1 so I can see that the session data is saved.
I then checked the server file system and verified that the session file is in place and the data is stored in it.
here is the start of page2 (with some added debugging code):
<?php
session_start();
echo '<pre>';
echo 'session id: ', session_id(), "\n";
$sessionfile = ini_get('session.save_path') . '/' . 'sess_'.session_id();
echo 'session file: ', $sessionfile, ' ';
var_dump($_SESSION);
echo "</pre>\n";
so what I see at the top of this page is a very different session id, and an empty session array.
I can't figure out why one page can write the session but the next one can't read it!