Roundcube 1.3.8 + Memcached + PHP 7.3

Aaron A asked:

I’m testing out moving my Roundcube 1.3.8 install over to php 7.3. It’s load balanced and I have been using memcache for session storage with php 5 without any issues:
$config[‘session_storage’] = ‘memcache’;

// Use these hosts for accessing memcached
// Define any number of hosts in the form of hostname:port or unix:///path/to/socket.file
$config['memcache_hosts'] = array( 'server1:11211','server2:11211');

When I try out this same config on php 7.3.3 I get the following error:

[17-Mar-2019 19:11:16 +0000]: DB Error: Failed to connect to memcached. Please check configuration in /path/to/roundcube/program/lib/Roundcube/rcube_session_memcache.php on line 49 (GET /mail/)

I’ve been able to run a simple test script from php 7.3 to verify that memcache is indeed working.

Any suggestions why this won’t work with Roundcube 1.3.8?

My answer:

TL;DR: Switch to redis.

PHP 7 no longer supports php-memcache, and the project appears abandoned. Only php-memcached is supported. These are two different PHP APIs for using memcached. Roundcube hasn’t been updated to use the new API, and apparently never will. A few distros are maintaining a fork of the old API but yours probably isn’t one of them, and you should expect even that to go away eventually.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.