Bug #14688 Updated: session_register() doesn't register
| From: | valdand at soften dot ktu dot lt | Date: | Thu, 11 Apr 2002 08:18:28 +0000 |
| Subject: | Bug #14688 Updated: session_register() doesn't register | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-4628@lists.php.net to get a copy of this message | ||
ID: 14688
Updated by: valdand@soften.ktu.lt
Reported By: niklas-phpbugs@alberth.com
Status: Feedback
Bug Type: Session related
Operating System: linux 2.2
PHP Version: 4.2.0RC2
New Comment:
FYI, with 4.0.5 my example scripts gives expected result - 4 with
register_globals = on, and the same nothing with register_globals =
off.
Previous Comments:
------------------------------------------------------------------------
[2002-04-10 11:10:21] valdand@soften.ktu.lt
With register_globals = off I get nothing, i.e. no number, just
newline, with or without session_unregister("counter"). Seems like
$counter does not exist at all.
------------------------------------------------------------------------
[2002-04-10 08:25:06] yohgaki@php.net
This is very strange. I have redirect and session works as it shold.
Could you try register_globals=Off to see if it works?
------------------------------------------------------------------------
[2002-04-10 05:59:35] valdand@soften.ktu.lt
Using 4.2.0.RC2 this behavior still there, you can check with these
scripts:
## i2.php
<?php
session_start();
$counter = 1;
session_register("counter");
header("Location: /i.php");
?>
## i.php
<?php
session_start();
$counter = 0;
### uncomment this to see the difference
# session_unregister("counter");
session_register("counter");
unset($counter);
$counter = 4;
session_register("counter");
header("Location: /i1.php");
?>
## i1.php
<?php
session_start();
print $counter;
?>
And then open http://host/i2.php in browser window.
Expected output - 4, but I get 0.
------------------------------------------------------------------------
[2002-04-01 15:53:51] sniper@php.net
AFAIK, this is fixed in CVS and PHP 4.2.0RC1.
Please test RC1 from: http://www.php.net/~derick/
and if it doesn't work, latest snapshot from http://snaps.php.net/
------------------------------------------------------------------------
[2002-03-12 13:43:33] colin@easydns.com
I notice this too under 4.1.2. unset($var) doesn't unregister $var
from the session
FWIW, this is with Linux 2.4.6-pre6, and I'm using the default files
for session storage.
- Colin
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/14688
--
Edit this bug report at http://bugs.php.net/?id=14688&edit=1