| Re: how to read sessionid in version 2.5 |
| by builderb on 2011/1/20 1:00:58 Try This: if (isset($_COOKIE)){ $sessionID = $_COOKIE['PHPSESSID']; // this will display the session variable(s) foreach ($sessionID as $sname => $svalue){ echo "<br><br>" . $sname ." : " .$svalue. "<br>"; foreach ($svalue as $vname => $vvalue){ echo $vname ." : " .$vvalue. "<br>"; } } // this will display the cookie foreach ($_COOKIE as $name => $value){ echo $name ." : " .$value. "<br>"; } } Hope this helps |
| Re: how to read sessionid in version 2.5 |
| by mschmid on 2011/1/13 0:45:36 Sorry I do not see the seesionid in the xoops config. If I do twice the following I only get once the session ID: echo "<br>session_id 1: " . session_id($_COOKIE[$xoopsConfig['session_name']]); echo "<br>session_id 2: " . session_id($_COOKIE[$xoopsConfig['session_name']]); Output: session_id 1: cif3msoorkoct6co9pi010ctjm session_id 2: what do I wrong? |
| how to read sessionid in version 2.5 |
| by mschmid on 2011/1/13 0:10:53 Hi Gurus in earlier version it was possible to get the session id: echo session_id(); or echo "session_id: " . session_id($_COOKIE[$xoopsConfig['session_name']]); now it is empty ?! if I do read out the xoops config, I get the session id: foreach ($xoopsConfig as $key => $req) { echo "<tr><td width=200>_xoopsConfig[" . $key . "] </td><td> " . $req . "</td></tr>"; $n = $n + 1; } ==> How can I read / access the session ID any hint will help Markus |