I'm experience a strange problem with my magento installation.

So, I can login (front and back office) in ie, firefox and in the front office with chrome but for some strange reason, I cannot login to the back office with chrome.

I managed to narrow down the problem (I think). It is related with the cookies.

This is how my cookies are before I try to login: enter image description here

And this is after, as you can see the first one "adminhtml" stays untouched. enter image description here

This is the problem. I don't know why is this cookie not been set to the proper value like the others. If I clear all the cookies I manage to login, but then when I logout and try to login again ,the same problem comes back.

Any thoughts? Thanks for the help.

UPDATE: From the provided link I'm trying to figure out what is happening.

Possible causes include

  • Local computer time vs. server time mismatch, causing instant cookie invalidation. Make sure your server time is correct.

Can anyone tell what exactly should I do here. My server time is Mon Oct 12 06:03:11 CDT 2015 and on the magento back-end I get 10/12/2015 12:02:25 pm (MM/DD/YYYY). So clearly there is a big difference between them (due to timezone differences), but I cannot change the server time (shared server). The only solution is to change the locale setting from the magento installation, right? But with this my costumers will get wrong timestamp on their invoices, I'm I right?

  • Incorrect permissions on var/session, preventing session files from being saved

I've checked this and it's 777.

  • Incorrect configuration of database/redis/other session storage, preventing saving of session values

Current configuration is _< session_save><![CDATA[files]]< /session_save>_ (app\etc\local.xml). I had already tried with db, but I got the same result.

  • A module is instantiating sessions to early, preventing the correct session names from being set

Anyway of testing this?

  • You're a developer using multiple URLs and have multiple cookie domains

Anyway of testing this?

  • Another developer has somehow modified app\code\core\Mage\Core\Model\Session\Abstract\Varien.php, creating a hard to track down bug

Restored this file to my original magento version. And I've checked that there is no local modification for this.

  • The cookie domain in System -> Configuration -> Web -> Session Cookie Management doesn't match the actual site domain.

Set this to NULL.

  • You're using the localhost as your server domain, and using a version of webkit that has trouble/bugs setting cookies for localhost in some situations.

Is not my case...

  • Extra: #php n98-magerun.phar sys:check

Everything OK except: ✖ No Bytecode-Cache found! It's recommended to install anyone of apc, eaccelerator, xcache, Zend Optimizer, Zend OPcache.

Not quite sure of what to do with this...

This is my current situation. Thank you all for the help


I've changed this file bellow and after this my problem vanish: I did this change through the local folder, but still believe that this isn't the right solution. Don't you?

File: app/code/core/Mage/Adminhtml/Controller/Action.php

class Mage_Adminhml_Controller_Action extends Mage_Core_Controller_Varien_Action

const SESSION_NAMESPACE = 'adminhtml'; changed this to 'adminhtml_1'

  • Check out this answer: magento.stackexchange.com/a/26083/6549 - it should help – Holly Oct 10 '15 at 7:08
  • did u manage to fix it ? I am facing the same issue – Attila Naghi Jan 30 '17 at 11:15
  • any news? It would be helpful to hear. – Gediminas Jun 22 '17 at 10:27
  • Try to set cookie domain with leading dot '.' in cookie domain System -> Configuration -> Web -> Session Cookie Management – Andrew Sh Jan 8 '18 at 1:50

Try deleting the cookies in chrome and also delete the sessions from the magento system, but be aware that if this is a production environment, this second step could clear the shopping cart for any online customers and log out any logged in customers etc.

Magento normally stores sessions in the file system in var/session, in the magento root directory.

So from the terminal run this command from within the Magento root directory

rm -rf var/session

Hope it helps!

  • 1
    It works for the first login, but then the problem returns. Thanks! – Jóni Oct 9 '15 at 17:03

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