This is a small note, but it can simply help to avoid long, fruitless hours. In my experience, the problems that arise when it is impossible to get the value from $ _COOKIE in zf1 and other frameworks are mainly due to the fact that setCookie is so easy to use that one of them forgets to add the path and domain as follows:
setcookie ('cookieName', 'cookieValue', $ finalExpirationTime, '/', '. yourdomain.com');
and instead do the following:
setcookie ('cookieName', 'cookieValue', $ finalExpirationTime);
This becomes especially annoying, especially when working with Windows with ip instead of real domains. Another thing to look out for is the dot (.) In front of the domain. As indicated in the manual: Older browsers still implementing legacy "RFC 2109 may require leading ones. To match all subdomains.
Hope this helps
source share