1

This isn't like the other topics here which complains about the magento admin login refreshes. The point where it is different is for correct username/password it refreshes but for invalid credentials it actually gives an error message as invalid username or password.

In most cases on both occasions the login just refreshes. But for me just the correct credentials refreshes and wrong gives the error message.

I have tried every other solutions posted on other thread, but no avail. Can anybody help me out? I will be very much obliged, Thank you.

***Note: This is after a server transfer.

  • which browser did you use? if you used chrome, try to use firefox and let me know – Nickool Jun 17 '16 at 17:12
  • Yes was in chrome.... Tried Firefox and started getting a new error "Invalid Form Key. Please refresh the page." – Arnab Ghosh Jun 17 '16 at 17:21
  • I believe you have the famouse core problem which you need to change try this and you will be fine stackoverflow.com/questions/15491819/… – Nickool Jun 17 '16 at 17:24
  • You are fantastic.... Tried everything...guess missed that post only... It worked. Post it and I will select it as an answer. – Arnab Ghosh Jun 17 '16 at 17:33
  • That is fine buddy :) no need to post anything ;) post it yourself and mention your errors and how you solved it – Nickool Jun 17 '16 at 17:34
2

You don't list what you've tried, so it's hard to rule anything out, but here are a few to try:

  • Check what type of session management is configured in app/etc/local.xml. If it's files, just delete the contents of the var/session directory. If it's db, then truncate the core_session table. If you're using something more complicated like Redis or memcached, make sure it's actually installed and configured correctly, especially seeing as you say you've moved servers.
  • Incorrect permissions on var/session, meaning the server can't write to the directory and sessions can't be started
  • Make sure your browser isn't blocking cookies
  • Try in private browsing mode, or a different browser
  • Check your cookies. Make sure there are no duplicate adminhtml cookies
  • Make sure there is no PHPSESSID cookie - this is an indication that the session is being created too early, using the default PHP session cookie name, rather than Magento's choice of name for admin sessions (adminhtml). This could indicate an extension may trying to start a session too early.
  • Have you installed any new extensions? Try setting disable_local_modules to true in app/etc/local.xml. If you can now login, try switch it back to false, disable all your community and local modules and then try enabling them one by one.
  • Are you hosting the site locally? Set your hostname to something that includes periods (.). Webkit browsers have problems setting cookies to domains without any periods (e.g. http://localhost/).
  • Make sure you have the correct cookie domain set, especially if you have multiple websites. Use this SQL snippet to check what's configured:

    select * from core_config_data WHERE path = 'web/cookie/cookie_domain';

  • Your cookie domain doesn't match your actual site domain

  • Mismatch between server time and local computer time, meaning cookies are instantly unset

  • Someone has hacked the class Mage_Core_Model_Session_Abstract_Varien. Download a copy of the Magento version your website is running from the Magento website and compare the class in there to your class.

  • Not enough disk space on the server, preventing session files being written

  • A developer has removed the formkey form element (unlikely), preventing Magento from processing the form. Look in the HTML source code of the login page for a form field called formkey

  • Use n98-magerun's sys:check command to find any other issues which may be causing this behaviour

  • There is a login issue in Google Chrome. Set Use HTTP only to No in the Session Cookie Management section of System, Configuration, Web. Don't do this on production servers as it is a security risk. Use this SQL snippet to update it: UPDATE core_config_data SET value = '0' WHERE path = 'web/cookie/cookie_httponly';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.