#20961 [Com]: session_decode causes the script to crash
| From: | JeanFrederic at Loiseau dot org | Date: | Sun, 29 Dec 2002 16:28:23 +0000 |
| Subject: | #20961 [Com]: session_decode causes the script to crash | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-28673@lists.php.net to get a copy of this message | ||
ID: 20961
Comment by: JeanFrederic@Loiseau.org
Reported By: mthornton@wei.cc
Status: Feedback
Bug Type: Reproducible crash
Operating System: Linux/Windows
PHP Version: 4.2.3
New Comment:
I have the same issue, but under Windows XP.
I have tried Php version 4.3 (latest), but this issue still exist...
Is there a workaround ?
thanks in advance,
Jean-Frederic
Previous Comments:
------------------------------------------------------------------------
[2002-12-12 09:53:59] iliaa@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-latest.zip
------------------------------------------------------------------------
[2002-12-12 09:53:01] mthornton@wei.cc
function get_session_decode($sessStr)
{
if ($sessStr) {
session_decode($sessStr);
unset($sessStr);
$vars = get_defined_vars();
return $vars;
} //if
} //func
The following function should return an array of session variables:
function get_session_decode($sessStr)
{
if ($sessStr) {
session_decode($sessStr);
unset($sessStr);
$vars = get_defined_vars();
return $vars;
} //if
} //func
print_r(get_session_decode('TEST|s:7:"testing";'));
however session_decode always crashes when you pass it a valid session
string. It does not crash if you pass it an invalid session string or
an empty/false string. I tried using the function by it self, but it
still crashes. No sessions where created at the time (which SHOULD NOT
be needed).
If you call session_start() first, it does not crash, but does not set
any variables.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20961&edit=1