PHP 4.0 Bug #8772 Updated: user level session storage fails when register_globals off
| From: | cynic@php.net | Date: | Tue, 23 Jan 2001 21:19:13 +0000 |
| Subject: | PHP 4.0 Bug #8772 Updated: user level session storage fails when register_globals off | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-44850@lists.php.net to get a copy of this message | ||
ID: 8772
Updated by: cynic
Reported By: serge@freezefotoz.com
Old-Status: Open
Status: Feedback
Bug Type: *Session related
Assigned To:
Comments:
it won't print the contents this way. you must use either
echo "session var test = {$HTTP_SESSION_VARS[test]}";
or
echo "session var test = " . $HTTP_SESSION_VARS[test];
if this solves your problem, close the bug, please.
Previous Comments:
---------------------------------------------------------------------------
[2001-01-23 13:49:50] serge@freezefotoz.com
Yes I did, I followed the examples described in the latest documentation.
session_register("test");
$HTTP_SESSION_VARS['test'] = '12345';
when I try to print on another page,
echo "session var test = $HTTP_SESSION_VARS[test]";
it comes up empty...?
When I look in the database, I have a session record, but the data is empty?
Serge
---------------------------------------------------------------------------
[2001-01-18 06:22:05] sniper@php.net
Feedback by Sascha Schumann <sascha@schumann.cx>:
-------------------------------------------------
And did you assign your data to $HTTP_SESSION_VARS["foo"]
instead of $foo?
The user level storage module gets exactly the same set of
data as the other modules. In fact, there is no distinction
in the session module as to how the data is stored.
- Sascha
---------------------------------------------------------------------------
[2001-01-17 20:36:03] serge@freezefotoz.com
When using a user level session storage method to db for example, if register_globals is off, a
session record is added to the database, but it contains no serialized data. The data portion is
empty.
If I turn register_globals on, the the database record for
the session contains the serialized data.
Is this a bug or a feature???
Thanks, Serge
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8772