php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #19540 session_destroy() fails when session_name() is used
Submitted: 2002-09-21 09:45 UTC Modified: 2002-09-21 09:49 UTC
From: bmertg at yahoo dot com Assigned:
Status: Closed Package: Session related
PHP Version: 4.2.2 OS: Win2000Pro, Redhead Linux
Private report: No CVE-ID: None
 [2002-09-21 09:45 UTC] bmertg at yahoo dot com
Session is not destroyed with the code below. but when you remove the session_name() from both files it works properly.
i tried on php v4.1.1+win2000 and php v4.2.2 on Linux.


//anypage.php
ob_start();
session_name('mySessID');
session_start();
...

//logoff.php
ob_start();
session_name('mySessID');
session_start();
session_unset();
session_destroy();
header("Location: ".$host); 
ob_end_flush();

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-09-21 09:49 UTC] nicos@php.net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 17:01:30 2024 UTC