note 103053 deleted from book.session by danbrown

From: Date: Tue, 22 Mar 2011 18:53:11 +0000
Subject: note 103053 deleted from book.session by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-178109@lists.php.net to get a copy of this message
Note Submitter: Lee Howarth ---- I was quite intrigued with what i tested, php://memory is used for storing the loaded file in quested and then on shutdown it will be purged... However i couldnt understand why when i put $_SESSIONS in the memory that they wasn't flushed... session_save_path(file_get_contents('php://memory', 'w+')); session_start(); // echo session_id(); //$_SESSION['name'] = 'RememberMe'; var_dump(file_get_contents('php://memory')); echo $_SESSION['name']; so at first i was just printing the session_id and it was coming back the same everytime so then i uncommented and defined $_SESSION['name'] ran the page a couple of times then commented it out, the var_dump shows no data saved which is quite confusing as no errors are thrown for it to be saved... Invisible PHP Sessions?

« previous php.notes (#178109) next »