I have a simple test page to set a cookie and then determine if it was set.
It’s not setting the cookie:
<?php
if(!isset($_COOKIE["CMS"])) {
$domain = ($_SERVER['HTTP_HOST'] != 'localhost') ? $_SERVER['HTTP_HOST'] : false;
setcookie("CMS", $email, time()+3600, '/', $domain, false);
$_COOKIE["CMS"] = "test";
echo"Cookie not set / ";
echo $_COOKIE['CMS'];
}else{
echo"cookie is set";
}
?>