Magento cookie problem [fixed]
There can be quite a few reasons why Magento issues the “enable cookies” page, it is usually a slight server misconfiguration, but can sometimes be down to a caching system or incorrect admin settings. Firefox seems to be untainted by this problem and troopers on regardless. IE, Opera and Chrome however, seem to have issues.
As there are many ways this problem can present itself, I think it’s a good idea to run through what worked for us, and then other possible solutions if that doesn’t fix it for you.
1. Synchronize the system clock
These instructions are for CentOS 5.*; how to install and configure NTP under CentOS Linux 5 server to synchronize the system clock.
Login as the root user
Type the following command to install ntp
# yum install ntp
Turn on service
# chkconfig ntpd on
Synchronize the system clock with 0.pool.ntp.org server:
# ntpdate pool.ntp.org
Start the NTP:
# /etc/init.d/ntpd start
Now check whether this has solved the cookie problem…
If not, let’s keep trying with the following:
OR…
2. Change cookie lifetime
Go to: Admin Panel -> System -> Configuration -> General-> Web-> Session Cookie Management and change COOKIE LIFETIME to 5400
(5400 seconds=90 minutes)
OR…
3. Remove Cookie params
Quite a drastic measure, so make sure to comment out, rather than delete:
Go to: Magento Folder/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
and comment out the following that starts at about line 78 as you see below.
/*
session_set_cookie_params(
$this->getCookie()->getLifetime(),
$this->getCookie()->getPath()
$this->getCookie()->getDomain(),
$this->getCookie()->isSecure(),
$this->getCookie()->getHttponly()
);
*/
I hoped that has helped you solve the Magento cookie problem, please leave a note to let us know how you get on. ![]()
Related Articles
- 24.02.11: Add site name to title Joomla (0)
- 05.04.11: CSR contains a key size that is less than 2048 bits (0)
- 14.03.11: Turn off page titles globally in Joomla (0)
- 23.06.11: Add logo to print popup in Joomla (0)
- 26.07.11: Backup Incoming and Outgoing mail for your domain EXIM (0)









Comments RSS Feed





Thanks
Searching about same issue for some days now.
Go to Top of the page
Awesome thank you.
This was an occasional hassle in 1.3, but once we upgraded to 1.4.2 it was a show-stopper. The NTP thing worked perfectly and I would never have dreamed up that. I owe you guys a doughnut.
Go to Top of the page
It worked for me slightly different: setting the COOKIE LIFETIME to 0 - zero and commenting out the Cookie Params. Thank so much for you help.
Go to Top of the page
Thank you very much for your help. It (almost) saves my life!
Go to Top of the page
Well, after hours spent on this issue I managed to solve it but in my case the issue was that the development server hostname that we were using had an underscore character in it (e.g. my_hostname.com). It seems it’s a well known fact that IE can’t store cookies if the hostname has underscore characters in it.
Go to Top of the page
@Tibi
Heh, for once Microsoft followed a standard to the letter and it tripped you up.
Go to Top of the page
Magento 1.5.1.0 & Chrome cookie issue. Solved by using the 2nd solution, change cookie lifetime to 5400
Go to Top of the page
thank you, I somehow changed my frontend admin Cookie Lifetime to 1, therefore not allowing me to edit anything in backend without having to log back in. This fixed my problem, cheers!
Go to Top of the page