Garry Posted April 2, 2017 Report Posted April 2, 2017 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. Quote
Cody R. Posted April 2, 2017 Report Posted April 2, 2017 I haven't tested this but I'd imagine this post here is still valid. Usually you can point to a socket using the unix:// method as noted above. Please let me know if this works! Garry 1 Quote
Garry Posted April 3, 2017 Author Report Posted April 3, 2017 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 Quote
Tony Posted April 3, 2017 Report Posted April 3, 2017 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. Quote
Garry Posted April 3, 2017 Author Report Posted April 3, 2017 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. Quote
Tony Posted April 3, 2017 Report Posted April 3, 2017 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. Quote
Garry Posted April 3, 2017 Author Report Posted April 3, 2017 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, ) ) ); Quote
Tony Posted April 3, 2017 Report Posted April 3, 2017 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. Garry 1 Quote
Recommended Posts
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.