PHP 4.0 Bug #6283 Updated: cannot destroy session data an unregister session variables

From: Date: Thu, 05 Oct 2000 08:57:42 +0000
Subject: PHP 4.0 Bug #6283 Updated: cannot destroy session data an unregister session variables
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-34286@lists.php.net to get a copy of this message
In version 4.0.2 unlink() again works fine, so the method (see below) works as expected. I put in the code with session_unregister() as an alternativ to destroy session data on logout. Because the unlink() code works I did not check the alternativ code segment with the latest release. > -----Ursprüngliche Nachricht----- > Von: Bug Database [mailto:php-dev@lists.php.net] > Gesendet am: Dienstag, 3. Oktober 2000 09:05 > An: klaus.habeck@berlin.de > Betreff: PHP 4.0 Bug #6283 Updated: cannot destroy session data an > unregister session variables > > ID: 6283 > Updated by: waldschrott > Reported By: klaus.habeck@berlin.de > Status: Feedback > Bug Type: *General Issues > Assigned To: > Comments: > > There currently is a bug (#5231)in session_destroy(), are there > still any problems with session_unregister()? > > Previous Comments: > ------------------------------------------------------------------ > --------- > > [2000-08-21 17:51:16] klaus.habeck@berlin.de > Hi folks, In version 4.0.1pl2 the functions "session_destroy" > and "session_unregister" do not work as expected. If I for > example want to destroy unused session data and - after starting > a session - try to delete this session there is not reaction > (i.e. unlinking the session file). This function already does > not work in earlier releases properly. So I unlink the file with > a user function for destroying the session data. New in version > 4.0.1pl2 is a bug in "session_unregister". While this works fine > in the betas of php4 the latest version is unable to unregister > session variables. Below you see the code, which is part of a > class. This is the code that I used under php4rc2 and that always > works fine until php4pl2: function Logout($login_url) > session_name("HCSESSION"); session_start(); $id = > session_id(); $path = session_save_path(); # > session_unregister("HCUSERNAME"); # > session_unregister("HCLASTNAME"); # > session_unregister("HCFIRSTNAME"); # > session_unregister("HCMAILADDRESS"); # > session_unregister("HCEDITMODE"); session_destroy(); > unlink("$path/sess_$id"); if (trim($login_url)) > header("Location: $login_url"); exit; } return $id; } For > the security of session handling I wood be glad if you can find a > solution for this bug. Thanks a lot Klaus Habeck > > ------------------------------------------------------------------ > --------- > > > Full Bug description available at: http://bugs.php.net/?id=6283 > >

« previous php.dev (#34286) next »