Magento Admin panel in Localhost

You cannot login admin panel in Magento after install magento in your  localhost.

Go to the

app/code/core/Mage/Core/Model/Session/Abstract/Varien.php

and then open it.

Find

// session cookie params $cookieParams = array( ‘lifetime’ => $cookie->getLifetime(), ‘path’     => $cookie->getPath() ‘domain’   => $cookie->getConfigDomain(), ‘secure’   => $cookie->isSecure(), ‘httponly’ => $cookie->getHttponly() );

if (!$cookieParams[‘httponly’]) { unset($cookieParams[‘httponly’]); if (!$cookieParams[‘secure’]) { unset($cookieParams[‘secure’]); if (!$cookieParams[‘domain’]) { unset($cookieParams[‘domain’]); } } } and chang to following // session cookie params $cookieParams = array( ‘lifetime’ => $cookie->getLifetime(), ‘path’     => $cookie->getPath() //‘domain’   => $cookie->getConfigDomain(), // ‘secure’   => $cookie->isSecure(), //‘httponly’ => $cookie->getHttponly() );

/ if (!$cookieParams[‘httponly’]) { unset($cookieParams[‘httponly’]); if (!$cookieParams[‘secure’]) { unset($cookieParams[‘secure’]); if (!$cookieParams[‘domain’]) { unset($cookieParams[‘domain’]); } } } / Now, you can login admin panel in localhost.

comments powered byDisqus