Magento & Memcached - HTTPS Errors

2.2k Views Asked by At

I've tried installing both fast cache using memcached and full page caching in magento enterprise. The first by editing the local.xml file, and the latter by editing the enterprise.xml file.

Each time I change one of them and commit it to the site, HTTP requests function as normal, and data is added to the memcached system (using memcache-top to check) however HTTPs some HTTPS functions dont' seem to work, such as logging into the admin. In particular the dashboard never seems to work.

Here is a dump from the magento/var/report:

a:5:{i:0;s:85:"Unknown number format type 'boolean'. Format '' must be a valid number format string.";i:1;s:3529:"#0 /var/www/magento/lib/Zend/Locale/Format.php(305): Zend_Locale_Format::_checkOptions(Array)
#1 /var/www/magento/lib/Zend/Currency.php(186): Zend_Locale_Format::toNumber('133.370000', Array)
#2 /var/www/magento/app/code/core/Mage/Directory/Model/Currency.php(233): Zend_Currency->toCurrency('133.370000', Array)
#3 /var/www/magento/app/code/core/Mage/Directory/Model/Currency.php(216): Mage_Directory_Model_Currency->formatTxt('133.37000000', Array)
#4 /var/www/magento/app/code/core/Mage/Directory/Model/Currency.php(197): Mage_Directory_Model_Currency->formatPrecision('133.37000000', 2, Array, true, false)
#5 /var/www/magento/app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php(82): Mage_Directory_Model_Currency->format('133.37000000')
#6 /var/www/magento/app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php(62): Mage_Adminhtml_Block_Dashboard_Bar->format('133.37000000')
#7 /var/www/magento/app/code/core/Mage/Adminhtml/Block/Dashboard/Totals.php(74): Mage_Adminhtml_Block_Dashboard_Bar->addTotal('Revenue', '133.37000000')
#8 /var/www/magento/app/code/core/Mage/Core/Block/Abstract.php(238): Mage_Adminhtml_Block_Dashboard_Totals->_prepareLayout()
#9 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(430): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#10 /var/www/magento/app/code/core/Mage/Adminhtml/Block/Dashboard.php(50): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...')
#11 /var/www/magento/app/code/core/Mage/Core/Block/Abstract.php(238): Mage_Adminhtml_Block_Dashboard->_prepareLayout()
#12 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(430): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#13 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(446): Mage_Core_Model_Layout->createBlock('adminhtml/dashb...', 'dashboard')
#14 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(238): Mage_Core_Model_Layout->addBlock('adminhtml/dashb...', 'dashboard')
#15 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(204): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#16 /var/www/magento/app/code/core/Mage/Core/Model/Layout.php(209): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#17 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(345): Mage_Core_Model_Layout->generateBlocks()
#18 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(270): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#19 /var/www/magento/app/code/core/Mage/Adminhtml/Controller/Action.php(263): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#20 /var/www/magento/app/code/core/Mage/Adminhtml/controllers/DashboardController.php(40): Mage_Adminhtml_Controller_Action->loadLayout()
#21 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(420): Mage_Adminhtml_DashboardController->indexAction()
#22 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#23 /var/www/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#24 /var/www/magento/app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#25 /var/www/magento/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#26 /var/www/magento/index.php(80): Mage::run('', 'store')
#27 {main}";s:3:"url";s:102:"/index.php/admin/dashboard/index/key/<<author's_note:this_was_a_hash>>/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:5:"admin";}

Is there a special procedure for turning on memcached with magento? The guides I've read don't mention anything special, but then I've seen a few things like here: http://www.magentocommerce.com/boards/viewthread/230185/#t386967

Where they mention turning off all caches before hand etc. FWIW after I reinstated the current local.xml, nothing I did would get the site back up again. Dumping caches, restarting apache, etc. I had to make the code change in the above to get the site up, then revert it later.

Is this normal magento behaviour?

2

There are 2 best solutions below

0
On

or use this

<backend><![CDATA[memcache]]></backend>
1
On

File app/etc/local.xml have to be edited

<config>
<global>
    <cache>
        <prefix>alphanumeric</prefix>
        <backend>memcached</backend><!-- apc / memcached / empty=file -->
        <memcached><!-- memcached cache backend related config -->
            <servers><!-- any number of server nodes can be included -->
                <server>
                    <host><![CDATA[127.0.0.1]]></host>
                    <port><![CDATA[11211]]></port>
                    <persistent><![CDATA[1]]></persistent>
                </server>
            </servers>
            <compression><![CDATA[0]]></compression>
            <cache_dir><![CDATA[]]></cache_dir>
            <hashed_directory_level><![CDATA[]]></hashed_directory_level>
            <hashed_directory_umask><![CDATA[]]></hashed_directory_umask>
            <file_name_prefix><![CDATA[]]></file_name_prefix>
        </memcached>
    </cache>
...

<prefix>alphanumeric</prefix> fix this error