ID: 27128
User updated by: dizit at mail dot ru
Reported By: dizit at mail dot ru
Status: Closed
Bug Type: Session related
Operating System: Win XP
PHP Version: 4.3.4
New Comment:
AND PHP 4.2.2 on Free BSD 4.3
Previous Comments:
------------------------------------------------------------------------
[2004-02-04 02:37:35] dizit at mail dot ru
Hellow [EMAIL PROTECTED] !!!
Are you looking through text above when write first answer?! Don't
confuse people, please.
Text below for other people who have interest to this problem:
----------------------
To next time i wrote the lette to [EMAIL PROTECTED] and then get the next
answer: "Get the latest CVS snapshot, this works fine there."
------------------------------------------------------------------------
[2004-02-03 08:27:05] [EMAIL PROTECTED]
The behaviour is correct.
(and hasn't changed since 4.2.2, the output of the script is exactly
same with 4.2.2 and 4.3.4)
------------------------------------------------------------------------
[2004-02-03 05:57:17] dizit at mail dot ru
Description:
------------
Run script below and see next:
BEGIN___________________________________________________
set var=56
session_register("var")
var=56
$GLOBALS["var"] - 56
session_unset()
ATENTION----> var=56
ATENTION----> $GLOBALS["var"] - and gettype($GLOBALS["var"]) is NULL
session_register("another")
ATENTION----> var="another"
___________________________________________________END
If run the script in the Zend Develoment Env. 3.02 Plus and see next
result:
BEGIN____________________________________________________
set var=56
session_register("var")
var=56
$GLOBALS["var"] - 56
session_unset()
var=56
$GLOBALS["var"] = 56 and gettype($GLOBALS["var"]) is integer
session_register("another")
var=56
____________________________________________________END
Win XP
Apache 1.3.26
php 4.3.2 and 4.3.4
php.ini
register_globals = On
Reproduce code:
---------------
<?
session_start();
$var=56;
echo '<p>set var=56';
session_register('var');
echo '<p>session_register("var")';
echo '<p>echo var='.$var;
echo '<p>echo $GLOBALS["var"] - '[EMAIL PROTECTED]'var'];
session_unset();echo '<p>session_unset()';
echo '<p>echo var='.$var;
echo '<p>echo $GLOBALS["var"] - '[EMAIL PROTECTED]'var'].' and
gettype($GLOBALS["var"]) is '.gettype(@$GLOBALS['var']);
session_register('another');
echo '<p>session_register("another")';
echo '<p>Once more echo var='.$var;
session_destroy();
?>
Expected result:
----------------
run on PHP Version 4.2.2 and see:
set var=56
session_register("var")
var=56
$GLOBALS["var"] - 56
session_unset()
var=NULL
$GLOBALS["var"] = NULL
session_register("another")
var=NULL
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27128&edit=1