I'm having troubles logging into Magento's admin panel on one of our staging sites (it works 100% on our webdev servers and was working just fine not too long ago on the staging server as well).
I've done some research, and most people suggest that it's got to do with running Magento on a localhost and browsers not saving cookies for domains with no dots in the domain name. The problem with that, however is that we're running it from http://staging.sitename... etc.
Another few things that were suggested are where someone changed the default name for accessing the admin in the config, but we haven't changed it.
Does anyone have any ideas that might help?
Thanks for taking the time to help me out!
Kind Regards,
Rémy
Visit your Magento admin backend in a browser, and click the link Forgot your password. Insert your email address, complete the CAPTCHA, and then press on the Retrieve Password button. An email will be send to your email address, containing a password reset link.
Default Admin URL and Path: http://yourdomain.com/magento/admin.
I managed to fix it! I found this solution here: http://blog.chapagain.com.np/magento-admin-login-problem/.
I wanted to know why that fixed it though and var_dumped the items I commented out and realized that the cookie domain was being set to just '/' and we have magento set up under '/shop/'. So I went to the configuration section (having managed to log in after commenting out the 3 lines mentioned in the article), changed the Cookie Domain and Cookie Path to be blank and saved. I then uncommented those lines and tried again and all's working well!
In new Magento Installation, do the following ->
Open the file
app/code/core/Mage/Core/Model/Session/Abstract/Varien.php.
and change the code at line 87 to this ->
$cookieParams = array( 'lifetime' => $cookie->getLifetime(), 'path' => $cookie->getPath(), // 'domain' => $cookie->getConfigDomain(), // 'secure' => $cookie->isSecure(), // 'httponly' => $cookie->getHttponly() );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With