views:

875

answers:

2

Hi All,

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

+1  A: 

Having the specific error would help. A couple shots in the dark -

It's worth checking your rewrites. I've had issues moving from server to server where one of them doesn't have the rewrite setup correctly. if servername.com/index.php/admin works, but servername.com/admin doesn't, then you have a rewrite issue.

It could conceivably also be that the base_url is not configured for the right server. Did you change it when you moved the database over? See my answer at this post for details.

Laizer
Thanks for your response!The problem is that there is no real error aside from the fact that it's not letting me log in. It's definitely not the base_url as I've checked in the magento_core_config_data table and it's got the staging link in there.It's also not the rewrite issue because I can see the page when I go to /admin without index.php at the end (I did try anyway just for good measure). It just ends up on the login page every time I click login. The only difference occurs when I deliberately put in the wrong login info, in which case it tells me I got the wrong username or password.
+1  A: 

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!

related questions