Unable to login magento admin panel generally occurs due session or cookies issue.So for cookies if you have two cookies with same name and different domain string then magento cann’t get to know which one to Handel then do nothing at all.So for this you will be getting several suggestion in several blogs.like below details.
1)Change option in admin config section “Use HTTP Only” to No. in the dir
Admin => Web => Session cookies management => Use HTTP Only
2)If you used firefox to install magento ,use googlechrome to open magento then go to the file
app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
from you magento directory and search for “session cookie params” comment the below line .
original
// session cookie params $cookieParams = array( 'lifetime' => $cookie->getLifetime(), 'path' => $cookie->getPath(), 'domain' => $cookie->getConfigDomain(), 'secure' => $cookie->isSecure(), 'httponly' => $cookie->getHttponly() );
Edited
// session cookie params $cookieParams = array( 'lifetime' => $cookie->getLifetime(), 'path' => $cookie->getPath(), 'domain' => $cookie->getConfigDomain(), 'secure' => $cookie->isSecure(), 'httponly' => $cookie->getHttponly()--> );
3)Go to
Admin => System => Configuration => Web => Unsecured and secure
change base url to
http://127.0.0.1/[Magento folder name]/ (For localhost only)
or change the site url from which you are accessing front-end.
So these all about the general solution you will find in most of the blog.But I would suggest you to below details before doing doing all above attempts because above may give you solution instantly which I guess is the temporary solution which will may create future issue that almost impossible to track:
- Incorrect configuration of database/redis/other session storage preventing saving of session value.
- Somewhere some session might be instantiated on early which is preventing session files from being saved.
- If you have used multiple URLs and multiple cookies domain Like I have explained on first line of this post.Sometimes if cookie domain system does not match the actual site domain.
- If you are using the localhost as your server domain make sure you have configure your secure and non-secure url as same.Please follow step three from above.
- Local computer time is miss-match with server time which cause instant cookie invalidation.
- So better to do is delete all the cookies ans session as well or find the error what needs to be through log or any-other way which never create serious problem and always can traceable.