I'm setting a cookie with PHP in www.mysite.com/CookieTest.php like so:
setcookie( "test", "value", time( ) + 259200000, "/" );
which works fine and I can see the cookie in the settings in Chrome. I then try and read the cookie in www.mysite.com/Login.php like so:
if( isset( $_COOKIE[ "test" ] ) == false )
{
echo "error";
}
which works fine with http, but not https. The above always returns false, and when I try
print_r( $_COOKIE );
it prints an empty array, even though I can see that there are 5 other cookies set on my site's domain in Chrome.
I'm using ajax in jquery to make the request to both CookieTest.php and Login.php using https. I have set the Access-Control-Allow-Origin header and I'm not getting an error about the origin so I don't think that's the problem.