Recommended Posts

Posted

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.

 

Posted

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




 

Posted

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.

Posted

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.

Posted

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,
        )
    )
);
Posted

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.

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...