I have followed the steps as givne phpredis README. When I reload the page site is going down, on cache clear I see the below error.

PHP Fatal error: Uncaught Error: Class 'Redis' not found in /var/www/html/drupal_redis/modules/contrib/redis/src/Client/PhpRedis.php:18

Comments

sriharsha.uppuluri created an issue. See original summary.

martin107’s picture

I can confirm ... this bug.

o'briat’s picture

hi,

Did you enable the PHP module named phpredis as explained in the README ?

You could check it with phpinfo or the Drupal status page: /admin/reports/status/php

It should display the following line :
Redis Version 2.2.X

More info on the module here:
https://pecl.php.net/package/redis
https://github.com/phpredis/phpredis/

martin107’s picture

Ah I've got my system working now

The setup instructions do need a little TLC

little PECL install here

A little

./configure
make
make install

There, and then a little

composer require phpredis/phpredis

and everything works

Can't say I followed the READE though...

o'briat’s picture

Status: Active » Closed (works as designed)

I think it's a bit out of the scope since installing this module is quite different from one system to another.

But you really really need to read all the readme from top to bottom (twice) since the Redis server and this Drupal module need fine tunnings, specially cache_prefix and server LRU.

batigolix’s picture

Note that if you receive this error when using drush you may have not have enabled the redis extension for php-cli yet. See: https://www.drupal.org/project/redis/issues/2944991

ivnish’s picture

If you use ubuntu needs to install php-redis package and then restart web-server