Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$_COOKIE variable empty #13029

Closed
eramirezprotec opened this issue Jun 4, 2018 · 1 comment
Closed

$_COOKIE variable empty #13029

eramirezprotec opened this issue Jun 4, 2018 · 1 comment
Labels
worksforme The issue cannot be reproduced and things work as intended.

Comments

@eramirezprotec
Copy link
Contributor

eramirezprotec commented Jun 4, 2018

Hi. I'm having some issues with the $_COOKIE variable. If I add this line of code error_log("COOKIES: ".json_encode($_COOKIE)); at the beginning of the piwik.php file, I can see the cookies the client is sending to the server. But after some processing, the $_COOKIE variable gets emptied. For example, if I put the same line of code (error_log("COOKIES: ".json_encode($_COOKIE));) within the code of the isExcluded method of the VisitExcluded class, I get an empty array. At some point, Matomo is reassigning the value of the $_COOKIE variable and that's preventing me from using features like Do Not Track.

I'm not sure if it happens because of some configuration on my server. I already checked the Apache and Redis configuration and I can't find anything that could trigger this strange behavior.

Have you ever faced an issue like this? This is happening with version 3.2.0, but I have a development environment that should be an "exact copy" and this issue is not happening there.

The only lines of code that I could find that modify the value of the $_COOKIE variable are these:

1 - $_COOKIE = isset($env['cookie']) ? $env['cookie'] : array(); // Located within the resetEnvironment method of the RequestSet class.
2 - unset($_COOKIE[$this->name]); //Located within the loadContentFromCookie of the Cookie class.

It seems that the first option is the one modifying the variable value. But why?

@eramirezprotec eramirezprotec changed the title $_COOKIES variable empty $_COOKIE variable empty Jun 4, 2018
@eramirezprotec
Copy link
Contributor Author

Updating QueuedTracking plugin to version 3.2.1 solved the issue.

@mattab mattab closed this as completed Jun 25, 2018
@mattab mattab added the worksforme The issue cannot be reproduced and things work as intended. label Jun 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

2 participants