php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18995 Can't unset() the session
Submitted: 2002-08-20 16:49 UTC Modified: 2002-08-20 18:47 UTC
From: frank at orite dot com Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.2.2 OS: Redhat Linux 7.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: frank at orite dot com
New email:
PHP Version: OS:

 

 [2002-08-20 16:49 UTC] frank at orite dot com
Apache/1.3.23 (Unix)  (Red-Hat/Linux)

register_globals = Off

[Session]
session.save_handler = files
session.save_path = /tmp
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_maxlifetime = 1440
session.referer_check =
session.entropy_length = 0
session.entropy_file =
;session.entropy_length = 16
;session.entropy_file = /dev/urandom
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 1
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"

I was trying to test the session via two pages, test.php and test2.php. Following are the scripts and results come up:

test.php
<?php
session_start();
$_SESSION["user"]="foo";
echo "set:".$_SESSION["user"];
unset($_SESSION);
echo "<br>unset:".@$_SESSION["user"];
?>

result on page:
set:foo
unset:

test2.php
<?php
session_start();
echo "set:".$_SESSION["user"];
echo "<br>unset:".@$_SESSION["user"];
?>

result on page:
set:foo
unset:foo

I've also tried to put up a session_destory() in test.php, that helps to unset the variable, but simply the session no longer exists.

Does anyone has the same problem, or any answers to this issue?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-20 16:49 UTC] derick@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the original bug instead.

Thank you for your interest in PHP.
 [2002-08-20 18:47 UTC] frank at orite dot com
oops
 [2003-05-19 15:36 UTC] cparrish at carlparrish dot com
It might be helpfull to post the bug number for the original bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 19:01:33 2024 UTC