ID: 19586 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Open +Status: Feedback Bug Type: Session related Operating System: ALL PHP Version: 4.2.2 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip I think this was fixed in 4.2.3, but it might just be in head. It's been awhile since I saw the fix... try it anyways. Previous Comments: ------------------------------------------------------------------------ [2002-09-24 22:23:06] [EMAIL PROTECTED] Below is the PHP Documentation on unregistering session variables... ------------ Note: If $_SESSION (or $HTTP_SESSION_VARS for PHP 4.0.6 or less) is used, use unset() to unregister a session variable. ------------ unset( $_SESSION['variable'] ) fails to unset the given session variable with registered_globals turned 'on' in ini file. It is safe to say that this is true on all operating systems. PHP versions this was tested on is 4.1.1 and 4.2.2, accross many different operating systems. Using unset( $_SESSION['variable'] ) will unset the variable on the current page only, and will not unset it in the global space. We have come up with a workaround that works fine with registered_globals on. See Below --> --------------- unset( $_SESSION['variable'], $variable ); --------------- The above works fine. I believe that the documentation needs to reflect this problem as countless developers in our community (Forums @ DevShed) has posted related problems using 'unset( $_SESSION['variable'] )'.... This applies only when registered_globals is truned 'on'. unset( $_SESSION['variable'] ) works fine with registered_globals 'off'. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19586&edit=1