Some time After the installation of magento we can't able to login in admin and we stuck that we have not installed Properly generically while installing some of the permission is required which is not available and so we need to edit one file
Go to app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory.
For Magento 1.4-1.5 Version
Find the code:
and replace with
For Magento < 1.6 Version
Find the code:
and replace with
We have commented few lines
After this save the file.clear the cache and And try to login into the admin.
Go to app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory.
For Magento 1.4-1.5 Version
Find the code:
session_set_cookie_params( $this->getCookie()->getLifetime(), $this->getCookie()->getPath(), $this->getCookie()->getDomain(), $this->getCookie()->isSecure(), $this->getCookie()->getHttponly() );
and replace with
session_set_cookie_params( $this->getCookie()->getLifetime(), $this->getCookie()->getPath() //$this->getCookie()->getDomain(), //$this->getCookie()->isSecure(), //$this->getCookie()->getHttponly() );
For Magento < 1.6 Version
Find the code:
$cookieParams = array( 'lifetime' => $cookie->getLifetime(), 'path' => $cookie->getPath(), 'domain' => $cookie->getConfigDomain(), 'secure' => $cookie->isSecure(), 'httponly' => $cookie->getHttponly() );
and replace with
$cookieParams = array( 'lifetime' => $cookie->getLifetime(), 'path' => $cookie->getPath(), // 'domain' => $cookie->getConfigDomain(), // 'secure' => $cookie->isSecure(), // 'httponly' => $cookie->getHttponly() );
We have commented few lines
After this save the file.clear the cache and And try to login into the admin.
Thank you..it works..
ReplyDelete