ID: 14767 Updated by: sander Reported By: [EMAIL PROTECTED] Old Status: Open Status: Bogus Bug Type: Session related Operating System: Linux 2.4 PHP Version: 4.1.1 New Comment:
session_unregister('test') should work. Alternatively, you can use unset($_SESSION['test']); Previous Comments: ------------------------------------------------------------------------ [2001-12-30 06:58:28] [EMAIL PROTECTED] In a project I work on I ran into something I would say is a bug.. When I call the page with ?debug=3 the session var 'test' gets the value "howdy" and gets stored (no need to call session_register('test'); (odd?)). After this there seem to be no way of unsetting/removing this session var.. At least non of the methods below works. Bug? unset in #2 (see below) removes the var, so it doesn't show up in the var_dump (#6), but upon calling the page again with ?debug=2 (only show sess-vars), it shows up again. At the same: $_GETand $_SERVER is displayed in phpinfo, but not $_SESSION. Another bug? In php.ini: register_globals = On Script: // #1 if ($debug==3) $_SESSION['test'] = "howdy"; // #2 if ($debug==4) unset($_SESSION['test']); // #3 if ($debug==5) unset($test); // #4 if ($debug==6) session_unregister($test); // #5 if ($debug==7) session_unregister($_SESSION['test']); // #6 if ($debug>1) var_dump($_SESSION); ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=14767&edit=1 -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]