I've got custom session handlers to store sessions in MySQL over HTTPS. Everything is working great except one thing.
My application is an online course. The main page (coursepage.php) displays consecutive pages stored from a $SESSION['pages'] array. I just pop the next page off the $SESSION['pages'] array into the $SESSION['current_page'] for forward navigation through the course. If $SESSION['current_page']['test_id'] is set, then I know there's a test associated with the page and I grab and display all the test data for a page like so:
if(isset($SESSION['current_page']['test_id'])){
$SESSION['current_test']=getTest();
}
This works great too...the tests are grabbed properly on the display page and displayed without problem. The problem happens when the user clicks "submit" on the test and we submit the test form to scoretest.php. On this page, all the session data remains intact except for the $SESSION['current_test'] array which is completely absent. This, of course, causes the test scoring page to error. I can manually reset this session var by calling $SESSION['current_test']=getTest() at the beginning of the scoretest.php page, but that's a work-around that shouldn't be necessary.
Does anyone know if there's a limit to the size of an array that you can pass in your session? Are there issues with certain versions of PHP that might cause this? It's not even as large as the other $_SESSION arrays I'm passing, but it just keeps disappearing. I've spent 7 hours debugging this one variable and can't figure out why it keeps getting lost.