From:             [EMAIL PROTECTED]
Operating system: FreeBSD 4.3 STABLE
PHP version:      4.0.5
PHP Bug Type:     *Session related
Bug description:  session_unregister() seems not work properly

It seems that session_unregister() should "remove" a var
from the session, isn't it ?

// First script, register the var
session_start() ;
session_register("somevar") ;
$HTTP_SESSION_VARS["somevar"] = "abc" ;
<a href="test2.php">Click Here</a>

// Second script, unregister the var
session_start() ;
echo "somevar is " . $HTTP_SESSION_VARS["somevar"] ;
session_unregister("somevar") ;
<br><a href="test3.php">Click here again</a>

// The third script, see the result
session_start() ;
session_unset() ;
session_destroy() ;

With the enable-trans-sid turned on, the result of the third
script is :
Array ( [somevar] => abc ) Array ( )

Is it a bug ?
How shoud I do if I want to "remove" some variables from
session but KEEP THE OTHERS unchanged ?

Best Regards

Edit Bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to