Hey.
I'm having an issue getting RoundCube to use Redis. Redis is supported by the server and I have a test script that simply logs the number of times that I have visited the site and it works just fine using the same connection info I have given RoundCube.
For RoundCube I have added the following to my config file:
$config['redis_hosts'] = 'localhost:7035:0:PASSWORD';
$config['redis_max_allowed_packet'] = '8M';
Host, port, database id and password is correct, and as I said it works in my php test script which is on the same domain as RoundCube - have I missed something?
RoundCube shows nothing in its errors.log file.
Doing "redis-cli monitor" on the same host, port and password as I've given both RoundCube and the test script shows nothing when RoundCube is in use. I can see changes from the test script just fine.
It does not use Redis by default, you have to enable session/caches for use with Redis.
I assume you mean I need to add this as well:
$config['session_storage'] = 'redis';
When doing so RoundCube won't load and in RoundCubes own error.log file I get these errors:
[02-Mar-2022 10:42:37 +0100]: REDIS Error: Redis host not configured in /var/www/html/roundcubemail-1.5.2/program/lib/Roundcube/cache/redis.php on line 85 (POST /roundcube/?_task=mail&_action=refresh)
[02-Mar-2022 10:42:37 +0100]: REDIS Error: Redis host not configured in /var/www/html/roundcubemail-1.5.2/program/lib/Roundcube/cache/redis.php on line 85 (GET /webmail/)
[02-Mar-2022 10:42:40 +0100]: REDIS Error: Redis host not configured in /var/www/html/roundcubemail-1.5.2/program/lib/Roundcube/cache/redis.php on line 85 (GET /webmail/)
[02-Mar-2022 10:42:47 +0100]: REDIS Error: Redis host not configured in /var/www/html/roundcubemail-1.5.2/program/lib/Roundcube/cache/redis.php on line 85 (POST /roundcube/?_task=mail&_action=refresh)
I am absolutely certain that Redis is running and working with the host, port, database id and password I put in the config file. I can monitor the database using redis-cli and see the test script use it as well.
Did I miss another thing?
$config['redis_hosts'] = 'localhost:7035:0:PASSWORD';
should be
$config['redis_hosts'] = ['localhost:7035:0:PASSWORD'];
i think, according to the examples in comments of the config file.
Hey, that worked - thanks :)
It does state in the comment above that "Currently only one host is supported" so I somehow disregared the brackets and just had it as a single string. I guess that was my own fault :P
I do see the Redis database being used now.
Thank you, @JohnDoh