SO I have a logout button that links to a script called logout.php, standard stuff.
Logout.php at the minute looks like this:
<?php
session_start();
$sid = session_id();
echo $sid;
session_destroy();
session_unset();
session_start();
session_regenerate_id(true);
$sid = session_id();
echo $sid;
?>
This code coming from doing some research on the internet (and stack overflow) and after using the simple:
session_start();
session_destroy();
Didnt work.
So the current script produces this:
a920o3mmfhh7gldak4ki4nure5
Warning: session_destroy() [function.session-destroy]: Session object destruction failed in (File Path)p on line 7
Warning: session_regenerate_id() [function.session-regenerate-id]: Session object destruction failed in (File Path) on line 12
a920o3mmfhh7gldak4ki4nure5
Has session_destroy been depreciated? Because I looked on manual and it didn't say it had been and its usually up to date. If not, can anyone see why it can't destroy my session?