I used memcache for sessions but can not login to both of frontend and backend in mg1810

before this, I did use redis for sessions and now want to use memcache instead of redis

Also did FLUSHALL in redis-cli, memcache service is running and local.xml set to ...



  • 1
    Does php -m list memcached? – Melvyn Apr 26 '14 at 13:47
  • @Melvyn : Great post man, thank you, my problem solved. please add your answer in main page please to accept it – sIiiS Apr 26 '14 at 17:48

Magento uses the memcached php extension to communicate with Memcache, but won't warn you if you don't have it.


I think you miss the 'cache' tag


For sessions in redis:

        <!-- other configuration nodes -->
        <redis_session>                       <!-- All options seen here are the defaults -->
            <host></host>            <!-- Specify an absolute path if using a unix socket -->
            <password></password>             <!-- Specify if your Redis server requires authentication -->
            <timeout>2.5</timeout>            <!-- This is the Redis connection timeout, not the locking timeout -->
            <persistent></persistent>         <!-- Specify unique string to enable persistent connections. -->
            <db>2</db>                        <!-- Redis database number; protection from accidental loss is improved by using a unique DB number for sessions -->
            <compression_threshold>2048</compression_threshold>  <!-- Set to 0 to disable compression (recommended when suhosin.session.encrypt=on); known bug with strings over 64k: https://github.com/colinmollenhour/Cm_Cache_Backend_Redis/issues/18 -->
            <compression_lib>gzip</compression_lib>              <!-- gzip, lzf or snappy -->
            <log_level>4</log_level>               <!-- 0 (emergency: system is unusable), 4 (warning; additional information, recommended), 5 (notice: normal but significant condition), 6 (info: informational messages), 7 (debug: the most information for development/testing) -->
            <max_concurrency>6</max_concurrency>                 <!-- maximum number of processes that can wait for a lock on one session; for large production clusters, set this to at least 10% of the number of PHP processes -->
            <break_after_frontend>5</break_after_frontend>       <!-- seconds to wait for a session lock in the frontend; not as critical as admin -->
            <bot_lifetime>7200</bot_lifetime>                    <!-- Bots get shorter session lifetimes. 0 to disable -->
        <!-- other configuration nodes -->
  • No, I deleted them only here, I use redis cache – sIiiS Apr 26 '14 at 12:36
  • You run Magento CE or EE? – ctasca Apr 26 '14 at 12:40
  • Magento CE version – sIiiS Apr 26 '14 at 12:45
  • check edited answer...that's how I set session in redis. Here is a good article inchoo.net/ecommerce/magento/… – ctasca Apr 26 '14 at 13:35
  • Dear, I know how to set redis for session but I want to use memcache for session and redis for cache, they are different! – sIiiS Apr 26 '14 at 17:37

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.