I have a site that uses www.example.com for standard pages and secure.example.com for HTTPS. I am trying to set a cookie when user logs in that will be valid on both the HTTP & HTTPS versions of the site.
I am doing this by setting path to "/" and domain to ".example.com". This works fine in Firefox and Internet Explorer, but in Chrome the cookie is only working on the version of the site where it was set (http://www.example.com or https://secure.example.com)
Is this a bug or am I doing something wrong? If it's a bug is there a workaround?
The cookie is being set by PHP in headers.
setcookie("login",base64_encode($email."::".md5($password)),2840184012,"/",".example.com");