ID:               39193
 Updated by:       [EMAIL PROTECTED]
 Reported By:      gearb0x at eml dot cc
-Status:           Open
+Status:           Assigned
 Bug Type:         Session related
 Operating System: Linux FC4
 PHP Version:      5.1.6
-Assigned To:      
+Assigned To:      iliaa


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

[2006-10-19 15:40:04] gearb0x at eml dot cc

It doesnt clear it, all variables stay intact as they were when the
session started. It clears it in the current execution of the script,
but the next time the page loads all the variables are back as they
were before they were unset call

If i make any changes to session variables AFTER ive tried to unset one
they are not saved in the session on the next page load

Its as if the session doesnt save, even forcing the save with
session_write_close does not work

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

[2006-10-19 07:47:04] [EMAIL PROTECTED]

Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.

>This should clear the session. 
But it does ... instead?

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

[2006-10-19 04:19:11] gearb0x at eml dot cc

replacing unset($_SESSION[$key]) with session_unregister($key) has the
desired effect -- which your not suposed to use according to all docs.

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

[2006-10-19 04:01:21] gearb0x at eml dot cc

Description:
------------
For some reason unseting session variables is stopping php from saving
any session variables. The code below should clear the session but it
isnt, this code worked fine on 5.1.2 on a freeBSD box. Also ive noticed
that if i make any changes to the session variables (ie: adding new
ones) they dont get saved in the session either

Reproduce code:
---------------
<?php

session_start();

foreach($_SESSION as $key=>$value)
{
        unset($_SESSION[$key]);
}

?>

Expected result:
----------------
This should clear the session. Also, any other changes made to the
session arent saved either (ie: creating more session variables



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


-- 
Edit this bug report at http://bugs.php.net/?id=39193&edit=1

Reply via email to