Harrie
Harrie

Reputation: 69

PHP PHPSESSID persists after calling session_name(***)

Can't seem to find the solution to the problem I'm having with my session.

$framework['session_name'] = "GenericSession";    

session_name($framework['session_name']);
session_set_cookie_params(0);
session_start();

In $_SERVERI find this:

 [HTTP_COOKIE] => PHPSESSID=uc2h858qkktji15g3qojom2104;
                  GenericSession=4dde6ufeepq21kiro2r931vui7

Can anyone tell me why there is still a PHPSESSID? How do I get rid of it?

Upvotes: 1

Views: 324

Answers (2)

SteJ
SteJ

Reputation: 1541

You need to unset the cookie in the browser See Here. To do this, use set_cookie.

I have borrowed the following from This Post:

setcookie (session_id(), "", time() - 3600);
session_destroy();
session_write_close();

Upvotes: 1

ThaDafinser
ThaDafinser

Reputation: 509

PHPSESSID comes from your Browser Cookie.

You need to reset your Cookies for this website and you'll see only your new cookie.

Upvotes: 1

Related Questions