From: [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version: 4.1.2
PHP Bug Type: Session related
Bug description: Session & register_globals
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 bug report at http://bugs.php.net/?id=17069&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=17069&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=17069&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=17069&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=17069&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17069&r=support
Expected behavior: http://bugs.php.net/fix.php?id=17069&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=17069&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=17069&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=17069&r=globals