Date: 08/23/02
- Next message: mfischer <email protected>: "[PHP-DOC] #14645 [Opn]: Problems assigning by reference to globals"
- Previous message: mfischer <email protected>: "[PHP-DOC] #15110 [Opn]: Sessions are not saved unless the session contains data"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 17069
Updated by: mfischer <email protected>
Reported By: drnix <email protected>
Status: Open
Bug Type: Documentation problem
Operating System: Windows 2000
PHP Version: 4.1.2
New Comment:
I'm wondering if this is actually still true. Can anyone confirm this?
Previous Comments:
------------------------------------------------------------------------
[2002-05-30 06:46:21] mfischer <email protected>
It's a mis-assumption that session_register()ing a global variable
put's it into $_SESSION in the same request.
Sessions never behaved this way.
The documentation should be clearer on this, reclassifying.
------------------------------------------------------------------------
[2002-05-07 05:57:46] drnix <email protected>
This code don't work properly:
----
<?php
session_start();
if (get_cfg_var('register_globals')) {
if (!session_is_registered('step')) {
session_register("step");
$step = 0;
}
} else {
if (!isset($_SESSION['step'])) {
$_SESSION['step'] = 0;
}
}
echo $_SESSION['step']++;
echo session_encode();
?>
<br><A HREF="<?php echo $_SERVER['PHP_SELF']?>">Reload</A>
----
If register_globals is On, reload will increment counter.
If register_globals is Off, session will "read_only" like.
It create session file with zero length. Any write not occurs.
session_encode() returns a empty string;
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17069&edit=1
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: mfischer <email protected>: "[PHP-DOC] #14645 [Opn]: Problems assigning by reference to globals"
- Previous message: mfischer <email protected>: "[PHP-DOC] #15110 [Opn]: Sessions are not saved unless the session contains data"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

