Re: PHP 4.0 Bug #6983: session_destroy() does not remove session
| From: | Teodor Cimpoesu | Date: | Tue, 03 Oct 2000 11:18:35 +0000 |
| Subject: | Re: PHP 4.0 Bug #6983: session_destroy() does not remove session | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-34148@lists.php.net to get a copy of this message | ||
Hi ptemple!
On Tue, 03 Oct 2000, ptemple@progressivepublishing.com wrote:
> From: ptemple@progressivepublishing.com
> Operating system: Windows 2000
> PHP version: 4.0.1pl2
> PHP Bug Type: *Session related
> Bug description: session_destroy() does not remove session
>
> I cannot seem to log a user out using the following script:
>
> session_start();
> session_unregister('varname');
> session_destroy();
> Header("Location: <homepageurl>");
>
from what I remember,session-destroy doesn't delete the session cookie
(least I haven't see the code to do that in session.c).
try
session_destroy();
Header("Location: <homepageurl>");
SetCookie (session_name(),'',0,'/');
and see if it works now.
-- teodor