I’m not an expert. But I did have the exact same problem as you do. I’ve tried many suggestions and only this one worked for me.
When I run find / -xdev 2>/dev/null -name "conf.d"
Results
/etc/php/7.4/apache2/conf.d
/etc/php/7.4/cli/conf.d
/etc/php/7.2/cli/conf.d
/etc/initramfs-tools/conf.d
/etc/fonts/conf.d
/usr/share/initramfs-tools/conf.d
I also tested this, remove the redis.ini file in /etc/php/7.4/apache2/conf.d and restart apache2. The same issue occurred again.
Good luck.
create a redis.ini in /etc/php/7.x/apache2/conf.d then restart apache2
It worked for me.
cd /etc/php/7.x/apache2/conf.d
sudo nano redis.ini
extension=redis.so
sudo apache2ctl restart