An error has cropped up on our site (PHP/Linux/Apache) where the $_COOKIE global variable loses all its values on certain pages. This is usually after either following a link with GET parameters or submitting a POST form. I'm really puzzled as to why this has suddenly started occuring. To illustrate, I have dumped out the values of the $_COOKIE variable on each page as I navigate through the site (some values replaced by xxx).
Home page (all fine):
Array
(
[nav-hosting] => 1
[nav-server_management] => 1
[locale] => en-US
[psaContext] => tools
[mycart] => xxx
[myid] => xxx
[__utma] => xxx
[__utmb] => xxx
[__utmc] => xxx
[__utmz] => xxx
)
Results page after submitting site search form (all fine):
Array
(
[nav-hosting] => 1
[nav-server_management] => 1
[locale] => en-US
[psaContext] => tools
[mycart] => xxx
[myid] => xxx
[__utma] => xxx
[__utmb] => xxx
[__utmc] => xxx
[__utmz] => xxx
)
Click through to a page from the search results (problem occurs):
Array
(
[1] =>
)
So, the $_COOKIE inexplicably has an index of 1 with a null value. Can anyone suggest what might be causing this?
A further click from that last page with the problem will resume all the original values again. Baffling!
As you did not provide any code, I´ll guess: Are you on another subdomain, or moved out of the path where your cookie is valid?