RE: [PHP] can't restart session
| From: | Adrian Portsmouth | Date: | Tue, 22 Jul 2003 07:18:59 +0000 |
| Subject: | RE: [PHP] can't restart session | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-156184@lists.php.net to get a copy of this message | ||
Chris,
As I said, you are not calling your session user_info, the only way to name
a session is to use session_name() BEFORE session_start() if you are not
using a session_name call then change your setcookie call to the following
and this should kill it for you:
setcookie(session_name(),"","","/");
The Proper way to solve your problem though would be to upgrade to the
latest version of PHP and use the session_regenerate_id() function which has
been put in exactly for the circumstances you are describing in this thread,
see: http://uk2.php.net/manual/en/function.session-regenerate-id.php
HTH
Ade
-----Original Message-----
From: CPT John W. Holmes [mailto:holmes072000@charter.net]
Sent: 21 July 2003 22:18
To: Chris W. Parker; php-general@lists.php.net
Subject: Re: [PHP] can't restart session
> In my first post I showed that one of the versions of the logout page
> that I used had this line in it.
>
> setcookie("user_info","",(time()-3600),"/");
>
> Shouldn't that take care of the cookie?
Like someone else said, that'll take care of a cookie called "user_info".
Your session cookie is named something else, usually PHPSESSID, IIRC.
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php