PHP startup - error unable to load redis.so

Hello,
I have installed Nextcloud 17 on centos 8 (with Nginx) ; it works great except for cache memory.
I have a message about redis.so which seems not be avalaible from EPEL centos 8 : “PHP Startup : unable to load dynamic library ‘redis.so’ …”
Is there a way to install redis properly ?

Best Regards,

Hi,

Could you please do the following?

  • tell us your PHP version installed (not PHP-CLI)
  • post the full error message
  • check if the redis.so file does exist on your system

What I am aiming at is a change in a PHP version, where modules are no longer enabled by the name “redis.so” but “redis” instead. The .so extension is appended automatically when looking for the file. So enabling with “redis.so” would search the module folder for a file “redis.so.so”.

Could be another issue for you, but I would like to rule that out as well.

php.x86_64 7.2.11-2.module_el8.1.0+209+03b9a8ff @AppStream

php-fpm[16524]: [13-Jan-2020 11:25:01] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library ‘redis.so’ (tried: /usr/lib64/php/modules/redis.so (/usr/lib64/php/modules/redis.so: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/redis.so.so (/usr/lib64/php/modules/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

This looks suspicious to me.
So have you checked?

  • if the file /usr/lib64/php/modules/redis.so exists
  • where and how you enabled the redis module in your ini files

Did you try to change the config line in the relevant ini file and remove the “.so” extension?

It seems php-pecl-redis is not anymore avalaible from EPEL in centos 8

yum list php-pecl-redis

CentOS-8 - AppStream 2.4 kB/s | 4.3 kB 00:01
CentOS-8 - Base 4.0 kB/s | 3.8 kB 00:00
CentOS-8 - Extras 927 B/s | 1.5 kB 00:01
Extra Packages for Enterprise Linux Modular 8 - 66 kB/s | 56 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 128 kB/s | 59 kB 00:00
Erreur : Aucun paquet correspondant à lister

So /usr/lib64/php/modules/redis.so is not installed

But maybe is a way to install it different from EPEL ?

(To make Nexcloud works, I installed php-fpm on centos 8 from default appstream repository

yum install php php-mysqlnd php-fpm php-opcache php-gd php-xml php-mbstring -y

I think you can install Redis from Remi repository.

OK, but do I have to remove my previous installation of php-fpm from AppStream ?
Is the php-pecl-redis compatible with php* from AppStream ?

Is there any hope that php-pecl-redis to be again available from AppStream or EPEL ?

Hello,
I have a centos 8 installation and fixed it adding this module
dnf install -y php php-igbinary

creating: /etc/php.d/20-redis.ini
adding the module:
extension=redis.so

removing from php.ini
extension=redis.so

restart:
systemctl restart php-fpm

I guess redis.so need to be loaded before some other modules.
hope it helps.