«

»

Jun 26

Print this Post

Fixing the Chrome cookie problem in Magento

After having this problem several times as I installed, and re-installed Magento, I decided to post this on my own blog for future reference.
Sometimes when using Magento with a Chrome browser the cookie functionality doesn’t work, the code modification is relatively simple.
Open the app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file and find the following code, somewhere near line 78:

$cookieParams = array(
//             'lifetime' => $cookie->getLifetime(),
            'path'     => $cookie->getPath(),
//             'domain'   => $cookie->getConfigDomain(),
//             'secure'   => $cookie->isSecure(),
            'httponly' => $cookie->getHttponly()
        );

Notice the three commented out lines. That is the minimum necessary to get cookies working with Chrome. You could also just comment out the whole section, as that will work as well.
That’s all there is to it. Enjoy!

Permanent link to this article: http://hillmantech.com/2012/06/26/fixing-the-chrome-cookie-problem-in-magento/

2 comments

  1. north face jackets sale

    Superb blog you have here but I was curious if you knew of any forums that cover the same topics discussed in this article? I’d really love to be a part of online community where I can get responses from other knowledgeable individuals that share the same interest. If you have any suggestions, please let me know. Bless you!

    1. ahillman3

      There is an attempt to get a Magento specific area on stackexchange, take a look: http://area51.stackexchange.com/proposals/48872/magento

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>