1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 Local MAMP Environment With Libmemcached: Cannot Log In

Discussion in 'Installation, Upgrade, and Import Support' started by LPH, Apr 2, 2016.

  1. LPH

    LPH Well-Known Member

    How to track down why I cannot log in on a local environment with Libmemcached?

    I decided to match a local MAMP environment with the live production site.

    1. Matched database name, username and password
    2. Installed Homebrew
    3. Installed memcached.so for PHP 7
    4. Restarted MAMP

    Once this was configured the WordPress side loaded fine but the XenForo side tossed errors for Undefined index, etc. These were all from my plugin, which I fixed immediately. Yay.

    After my fixes, the sites are loading but I cannot log into XenForo. No errors are in the error logs.

    My assumption is that this is due to cache. This is in the config.php

    $config['cache']['enabled'] = true;
    $config['cache']['frontend'] = 'Core';
    $config['cache']['frontendOptions']['cache_id_prefix'] = 'tux_';
    $config['cache']['cacheSessions'] = true;
    $config['cache']['backend'] = 'Libmemcached';
    $config['cache']['backendOptions'] = array(
        'compression' => false,
        'servers' => array(
    // Added 12/5/2014
    $config['externalDataUrl'] = 'http://trn.tuxreports.netdna-cdn.com/community/data';
    $config['javaScriptUrl'] = 'http://trn.tuxreports.netdna-cdn.com/community/js';
    Any ideas?
  2. Brogan

    Brogan XenForo Moderator Staff Member

    Have you tried removing the cache?
  3. LPH

    LPH Well-Known Member

    Do you mean commenting out all the config lines?

    Yes - and I'm able to log into the site. Which suggests this is a cache issue.

    Update: Guess it is easier to turn the true to false

    $config['cache']['enabled'] = false;
    But obviously I'm trying to get this to work enabled.
    Last edited: Apr 2, 2016
  4. Brogan

    Brogan XenForo Moderator Staff Member

    If it's just a local install then you don't need a cache.

    Otherwise you would need to configure the local "server" and install any relevant software accordingly.
  5. LPH

    LPH Well-Known Member

    Thought that's what I did :)

  6. Mike

    Mike XenForo Developer Staff Member

    Sounds like Memcache is full (or simply not saving your data).
  7. LPH

    LPH Well-Known Member

    Thank you @Brogan and @Mike. Your posts led me to realize the memcache server was never started.

    Ran this in the terminal
    /usr/local/bin/memcached -d -m 512 -l -p 11211

    Login and Logout now work and my local server matches production server now with caching enabled ! (y)

Share This Page