Posted on

Magento 2 PHPSESSID Cookie Value is the same to different devices / browsers

I am running Magento 2.4.3 with Nginx, PHP-FPM, Varnish and Redis for session and caching storage. When I have already added a product to cart and then I add another product, visiting the site through a different browser or another device, it is added together with the other item, in the end showing two items instead of one as expected. Again, adding another item from different device it will buld to 3 items in cart. I don’t have enabled persistent cart and I visit the site as anonymous user. I can see that the PHPSESSID cookie value for session is the same in all browsers somehow explaing why all share the same cart. Should not this be different across browsers – devices? Cookie Domain is the same value across magento and php conf. I have tried a lot of things in configuration of nginx, php, varnish and redis but nothing worked out. Where should I look? Any help would be greatly appreciated.

Leave a Reply

Your email address will not be published. Required fields are marked *