I'm using HTTPS and I would like to set the secure attribute for the PHPSESSID
and the other cookies
I have created.
session_set_cookie_params(0,'/','', isset($_SERVER["HTTPS"]));
session_start();
$data = session_get_cookie_params();
foreach ($data as $key=>$value) {
echo $key.$value;
}
The function seems to work, in fact, printing out session_get_cookie_params()
the secure attribute is equal to 1.
But, when I check my cookie state by Firefox
or by Firebug+Firecookie
they appear to be not affected at all by the statement. Even changing the domain attribute gives the same results.
I'm working on XAMPP, on Ubuntu and on localhost (localhost should have a special treatment for security issues, maybe). Thanks for your help!