Magento facing this issue due to Cookie's life time and some setting restrictions.
Another way to solve it is -
Here is two solutions you may try in order to solve such issue.
- Change the cookie lifetime configuration.Go to backend -> Sytem -> Configuration -> Web -> Session and Cookie Management Set cookie lifetime to 86400 and save it .
Another way to solve it is -
Go to the following directory - app/code/core/Mage/Core/Model/Session/Abstract/ within your magento and open Varien.php file.
Find the following code -
$cookieParams = array(
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath(),
'domain' => $cookie->getConfigDomain(),
'secure' => $cookie->isSecure(),
'httponly' => $cookie->getHttponly()
);
and replace it with the following code -
$cookieParams = array(Hope it will work. Thanks.
'lifetime' => $cookie->getLifetime(),
'path' => $cookie->getPath()
// 'domain' => $cookie->getConfigDomain(),
// 'secure' => $cookie->isSecure(),
// 'httponly' => $cookie->getHttponly()
);