I've managed to mangle my cookie string in IE so badly, it now looks like this:
"; __atuvc=4%7C7; PHPSESSID=e4db10eb5d4409ba3203a7c1d533fafd; PHPSESSID=75a04bdcf604dd607d383da774c0f72a; __utmc=51433896; __utma=51433896.100703801.1392175783.1392175783.1392178863.2; __utmb=51433896.5.10.1392178863; __utmz=51433896.1392175783.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __atuvc=3%7C7"
That's the output of typing document.cookie
into the IE11 developer bar.
You will notice PHPSESSID
is in there twice. I want to kill it.
I've tried running this in JavaScript:
document.cookie = 'PHPSESSID=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
And running this in PHP:
session_start();
setcookie('PHPSESSID', '', time()-3600);
setcookie('PHPSESSID', '', time()-3600, '/');
session_unset();
session_destroy();
But nothing seems to get rid of the cookie.
I'm aware I can delete the cookies manually through the browser, but a whole bunch of users have fried sessions right now, and I need a way to do it automatically.