We are using magento 1.7 I believe, when you are on our website on mozilla or IE on some pcs (not all) and you navigate to a product and click "add to cart" on the product page, you are redirected to "your cart is empty" page - in chrome it works and it's only on a select number of pc's here at the office.

What I have tried includes:

  • Set cookie lifetime: 86400
  • Set cookie domain: http://www.domain.com/
  • Set cookie path: to "/" upon suggestion

I can't figure out what might be causing this, has anyone experienced this issue before?

As a side note, it started occuring on exactly the 12th of February which is 5 days ago, I am not quite sure what went down on the 12th...

Thank you

7 Answers 7


Here's your problem:

Set cookie domain: http://www.domain.com/

Set your cookie domain to: .domain.com

  • so dot "." instead of everything before domain initially ? - trying it now
    – Madvillain
    Feb 19, 2015 at 15:03
  • Hello, I tried what you said and it didn't work I am desperately searching an answer..
    – Madvillain
    Feb 19, 2015 at 15:08
  • Make sure your /var/session folder is set to writable too. Feb 19, 2015 at 15:37
  • The /session folder has 777 read / write / read allowed in all three categories
    – Madvillain
    Feb 19, 2015 at 15:39
  • What about the time zone of your site & server clock. When you have orders come in is the time set correctly? The reason I ask is that it may be auto-expiring your sessions. Feb 19, 2015 at 15:45

I had similar problem. Changing caching setting in app/etc/local.xml solved it. I changed it session_save variable from file to db and it solved session setting problem.
Hope it helps.


Go to the admin panel: Sytem -> Configuration -> Web -> Session and Cookie Management

Set Cookie Lifetime to 86400 and save. The functionality will work as expected.

Also, check your form key in app/design/frontend/your_theme/default/template/checkout/cart.phtml

Code for form key: <?php echo $this->getBlockHtml('formkey'); ?>

If not available then add after this: getUrl('checkout/cart/updatePost') ?>" method="post">

  • I fixed the issue myself over a year ago, it was the cookie path
    – Madvillain
    Sep 12, 2016 at 7:44
  • And, exactly how you solve it ?
    – jacr1614
    Oct 6, 2017 at 23:59

I've got the same issue. The problem in my case is that my server has reach to the top of numbers of file that It can accept or manage. For fix this issue I done a cron for delete sessions files, and only save the sessions of the last month.


Open your database from PHPMyAdmin

Open core_config_data and change localhost to or your ip from

web/unsecure/base_url and web/secure/base_url

It's working in my case!


You could first try to solve this from your browser.

See this solution for Firefox: https://support.mozilla.org/nl/questions/1088310

Other browsers offer similar solutions.
For me, above solution worked for M 2.x.


In my case it was cookie domain issue. Setting it's correct value resloved the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.