ID:               19586
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Closed
 Bug Type:         Session related
 Operating System: ALL
 PHP Version:      4.2.2
 New Comment:

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
 
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
 
Thank you for the report, and for helping us make PHP better.




Previous Comments:
------------------------------------------------------------------------

[2002-10-13 12:21:42] [EMAIL PROTECTED]

[EMAIL PROTECTED]:

Did you use the solution I provided ->
unset( $_SESSION['variable'], $variable );

This works fine as a workaround until they can fix the problem...

------------------------------------------------------------------------

[2002-10-12 23:45:08] [EMAIL PROTECTED]

This problem is definitely not fixed in version 4.2.3. I'm running
Linux on a Cobalt RaQ 3i, and this is driving me up a wall...

------------------------------------------------------------------------

[2002-09-25 06:36:14] [EMAIL PROTECTED]

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.

------------------------------------------------------------------------

[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

Reply via email to