When i started learning Magento , my first step was installation of magento on my localhost ! I just began installation like WordPress & at that time i didnt aware it was much harder than wordpress installation , specially on localhost using Wamp server ! Sometimes on localhost after fresh magento installation you get the problem to not able to login in admin panel (backend) , whether your username & password are right.
You can solve this problem using following method.
Go to :-
app\code\core\Mage\Core\Model\Session\Abstract\varien.php
Find the code given below around 77 line :-
// session cookie params $cookieParams = array(</strong> 'lifetime' => $cookie->getLifetime(), 'path' => $cookie->getPath(), 'domain' => $cookie->getConfigDomain(), 'secure' => $cookie->isSecure(), 'httponly' => $cookie->getHttponly() );
Comment above code , Done.
Refresh & try to login again..
The real problem is that when a Magento instance is running through a localhost and tries to create a cookie, but fails to do so because it requires a domain and localhost is not a true domain..
Leave a comment , if it is useful to solve your problem !!
Thanks man! I couldn’t find this answer anywhere, until I found your site.
LikeLike
Feeling glad to hear from you , Nathan..
LikeLike