XenForo memcached setup how to use it?


Garry

Recommended Posts

Hi,

Just setting up my XenForo and would like to use memcached, by default it uses a port, but I understand you use a socket setup.
Anyway how do I config XenForo to work with Socket, instead of port?

PS. I didn't want to post in the phpBB3 post as it could be seen as being rude.

 

Link to comment
Share on other sites

It isn't working, I am running PHP 7.1, with memcached ticket in the settings, I have also started Memcached via cPanel.

XenForo is say:
Zend_Cache_Exception: The memcache extension must be loaded for using this backend ! - library/Zend/Cache.php:209

This is the XenForo setup I have in the config.php file

$config['cache']['backend'] = 'Memcached';
$config['cache']['backendOptions'] = array(
    'compression' => false,
    'servers' => array(
        array(
            'host' => 'unix:///home/XXXXXX/.hostdata/memcached.sock',
            'port' => 0,
        )
    )
);



I have also tried the host as

unix:///var/memcached/memcached.socket




 

Link to comment
Share on other sites

The problem is it is utilizing the memcache extension which is only available until PHP 5.6.  I'd suggest contacting Xenforo and seeing if there is a way for it to utilize the memcached extension which would be necessary if you're running PHP 7.1.

Link to comment
Share on other sites

I was running this on a VPS and had it working with PHP 7.1 using port, with memcached.
There is a guide on cPanel site: https://forums.cpanel.net/threads/installing-memcache-and-memcached-with-easyapache4.566261/#post-2414091

Post 8, using a pecl module

Not sure if this something you would setup on a shared hosting, so just putting it out there, just incase.
 

 

Link to comment
Share on other sites

Looking at that guide they are installing the memcache extension not the memcached extension.  Unfortunately I don't foresee us offering it as an option after PHP 5.6 just due to the fact it was last updated in 2013: https://pecl.php.net/package/memcache  .  I don't foresee us offering the memcache extension in PHP 7.0 or 7.1 simply because even our vendors (cPanel, CloudLinux) are not doing it.

Link to comment
Share on other sites

Thanks for the reply.
I think I have sorted it, by using libmemcached, instead.
Could you check to see in the logs if it working am on ams201 - overclan?

$config['cache']['backend'] = 'Libmemcached';
$config['cache']['backendOptions'] = array(
    'compression' => false,
    'servers' => array(
        array(
            'host' => '/home/USERNAME/.hostdata/memcached.sock',
            'port' => 0,
        )
    )
);
Link to comment
Share on other sites

Looks like a similar solution to phpbb where they refer to the php memcached extension as Libmemcached.  As for checking if it's working you'd be best to open a ticket.  Although for most applications if it's not working they typically end up hanging or throwing an error.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...