• 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

LPH

Well-known member
#1
Question:
How to track down why I cannot log in on a local environment with Libmemcached?

Background
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

Code:
$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(
        array(
            'host'=>'localhost',
            'port'=>'11211'
        )
    )
);

// 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?
 

LPH

Well-known member
#3
Have you tried removing the cache?
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

Code:
$config['cache']['enabled'] = false;
But obviously I'm trying to get this to work enabled.
 
Last edited:

Brogan

XenForo moderator
Staff member
#4
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.
 

LPH

Well-known member
#7
Sounds like Memcache is full (or simply not saving your data).
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 127.0.0.1 -p 11211

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