Skip to content

Instantly share code, notes, and snippets.

@anunay
Created December 3, 2013 05:01
Show Gist options
  • Save anunay/7764114 to your computer and use it in GitHub Desktop.
Save anunay/7764114 to your computer and use it in GitHub Desktop.
Fix magento 'httponly' error.
Fix Magento 'httponly' issue
============================
@anunay
Copy link
Author

anunay commented Dec 3, 2013

Fix Magento 'httponly' issue

Method 1:

Go to admin >>System>>Configuration >>Web>>Session Cookie Management

set 'Use HTTP Only' to 'No'

Method 2:

  1. Copy 'app/code/core/Mage/Core/Model/Session/Abstract/Varien.php' to 'app/code/local/Mage/Core/Model/Session/Abstract/Varien.php'

  2. Replace the following code:

    if (!$cookieParams['httponly']) {
        unset($cookieParams['httponly']);
        if (!$cookieParams['secure']) {
            unset($cookieParams['secure']);
            if (!$cookieParams['domain']) {
                unset($cookieParams['domain']);
            }
        }
    }
    

    with:

    if (isset($cookieParams['httponly'])) {
        unset($cookieParams['httponly']);
        if (isset($cookieParams['secure'])) {
            unset($cookieParams['secure']);
            if (isset($cookieParams['domain'])) {
                unset($cookieParams['domain']);
            }
        }
    }
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment