PHP 7.3 and Redis 5.0.5

SYSTEM INFORMATION
OS type and version: CentOS 7
Webmin version: 1.981
Virtualmin version: 6.17
Related products version: RECOMMENDED

Hi All,

I have been using PHP 7.3 and Redis 5.0.5 from SCL for a while now.
I have been looking into the site performance (wordpress) and its using predis, rather than phpredis.

Is there a way of getting phpredis installed using the versions of PHP and Redis that I do have? I couldn’t see the extension on SCL.

Thanks,
Craig

Hi, Craig.

A PHP extension for Redis is available from EPEL repos, with the name php-pecl-redis, meaning you can run the following command on CentOS 7 to install it (version 5.3.2 at the moment of writing):

yum install php-pecl-redis

Thanks for the reply.
I’ve ran that and it installed it ok. is there anything else i need to do?

I use a plugin on a Wordpress site and that reports it is using predis (v1.16) rather than phpredis.
In the diagnostics, it shows:

PhpRedis: Not loaded
Predis: 1.1.6

Thanks again :slight_smile:

No idea. This question should be addressed to the plugin developers. Virtualmin has nothing to do with it.

Thanks for the advice.

Would you expect to see some reference to the phpredis extention in phpinfo once installed?

Or can I see anywhere in virtualmin a reference to it?

Yes, in case it was loaded.

Example:

I don’t see that in mine.

I have no redis section whatsoever.

It means the extension hasn’t been loaded (added on the current PHP config).

Could you possibly point me in the right direction to getting it loaded/added to the current php config?

I have multiple versions running, all from software collections.

Did you restart systemctl restart php-fpm?

Check repo:

sudo yum search php-pecl-redis
sudo yum search php-pecl-redis5

Sample outputs:

============================== Name Exactly Matched: php-pecl-redis5 ==============================
php-pecl-redis5.x86_64 : Extension for communicating with the Redis key-value store
================================== Name Matched: php-pecl-redis5 ==================================
php70-php-pecl-redis5.x86_64 : Extension for communicating with the Redis key-value store
php71-php-pecl-redis5.x86_64 : Extension for communicating with the Redis key-value store
php72-php-pecl-redis5.x86_64 : Extension for communicating with the Redis key-value store
php73-php-pecl-redis5.x86_64 : Extension for communicating with the Redis key-value store
php74-php-pecl-redis5.x86_64 : Extension for communicating with the Redis key-value store

Install the version that is the active stream.

Oooo, that is looking promising!
Thank you so much!

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.