PHP Redis extension version 4 safe?

Which version of REDIS should I install? I know from this post it needs to be at least 3.1.3…

But I just did a pecl install redis and it is offering redis-4.1.1

Is this safe or do I need to force 3.1.3? If so how?

If it is safe, what is the answer to the question!

[email protected]:~# pecl install redis
WARNING: channel "" has updated its protocols, use "pecl channel-update" to update
downloading redis-4.1.1.tgz ...
Starting to download redis-4.1.1.tgz (220,894 bytes)
..............................................done: 220,894 bytes
25 source files, building
running: phpize
Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012
enable igbinary serializer support? [no] :

I’m using 3.1.6, the last version before v4 until someone confirms emoncms is ok with v4>. So the command to use would be

sudo pecl install redis-3.1.6

(for the benefit of other readers, I note you are actually running as root so don’t need sudo)

I have not recommended changing the guide(s) as it would require explanation and possibly cause further confusion down the line and we have not long cleared up the confusion brought about by the 1st emonpi image, IMO it would be better to confirm the position with emoncms and fix if needed. I had no idea such a core question would go unresolved for so long.

[edit] just hit enter to answer the question, it will use the default answer offered “no”

1 Like

I think the guides need updating in case this is an issue. It might cause unexpected problems. If the guides use a version known to work, it helps.

Thanks for your help.

…also the second line of the output you showed us above, points out you need to run an update, that too is part of the guide (or at least one of them)

sudo pecl channel-update

(see emoncms/docs/RaspberryPi at master · emoncms/emoncms · GitHub)

I’m not disagreeing with you, but I have raised an issue to discuss the matter (over 5mths ago) and it has fallen on deaf ears, I’ve pointed out it might break so a decision should indeed be made to test/fix emoncms or plug the hole with a edit to the guides, but it’s not my decision to make, if it was, it would be tested and fixed already.

I’m not able to confirm if the emoncms code is safe or not, v4+ might be perfectly ok to use, I have no idea. I only reported the “possible breaking changes” for someone that knows to confirm and I choose to use 3.1.6 in the interim rather than using my live server as a guinea pig.

[edit] Also for the benefit of other readers, what we’re discussing here is not “Redis” the in memory database, but the “phpredis” PHP extension that is referred to as just “Redis” in the PHP modules listings.

1 Like