When you want to install magento in your local machine by either wamp server or by Xamp server then you will face a problem, while logging into magento admin panel, after successfull install.
Here are the fix to logging into magento.This fix work above Magento version 1.4.1
Go to the location app/code/core/Mage/Core/Model/Session/Abstract/ and open Varien.php then go to line number 86. There you will find the below code.
if (!$cookieParams['httponly']) {
unset($cookieParams['httponly']);
if (!$cookieParams['secure']) {
unset($cookieParams['secure']);
if (!$cookieParams['domain']) {
unset($cookieParams['domain']);
}
}
}
if (isset($cookieParams['domain'])) {
$cookieParams['domain'] = $cookie->getDomain();
}
Comment this code, then your code will look like this
/* if (!$cookieParams['httponly']) {
unset($cookieParams['httponly']);
if (!$cookieParams['secure']) {
unset($cookieParams['secure']);
if (!$cookieParams['domain']) {
unset($cookieParams['domain']);
}
}
}
if (isset($cookieParams['domain'])) {
$cookieParams['domain'] = $cookie->getDomain();
}*/
Save the file and Refresh your admin panel page and try to login once again , Now you will be able to login to your Admin Dashboard
No comments:
Post a Comment