cannot install PECL PHPRedis with PHP 5.6

Greg M

Active Member
May 26, 2016
43
13
8
Glasgow, Scotland
cPanel Access Level
Root Administrator
So I am trying to set up Redis for Wordpress Caching,

I have Redis server 3.2 installed, and am using PHP 5.6

When I go into the module installer for PECL's and search redis it shows the 3.0 extension which is not compatible with php 5.6 Same thing when I try 'pecl install redis' via cli, I get the following:

Code:
[[email protected] ~]# pecl install redis
pecl/redis requires PHP (version >= 7.0.0, version <= 7.1.0, excluded versions: 6.0.0), installed version is 5.6.22
No valid packages found
install failed
From what I understand I must install the PHP Redis 2.2.8 PECL PECL :: Package :: redis :: 2.2.8

but I cannot find any information how to actually get this done, in all honesty I dont think the cPanel interface should list version 3.0 if it is not compatible with my PHP version.

Anyway could someone please advise on how to get this installed properly as I cannot find a suitable walk through for cpanel systems.
 

syslint

Well-Known Member
Verifed Vendor
Oct 9, 2006
268
7
168
India
cPanel Access Level
Root Administrator
Twitter
Hello,

You can install the pecl redis extension manually using the phpize command . You may download the source files from PECL :: Package :: redis
 

twhiting9275

Well-Known Member
Sep 26, 2002
560
28
178
cPanel Access Level
Root Administrator
Twitter
from SSH (as root)
Code:
mkdir ~/redis
cd ~/redis
wget  https://pecl.php.net/get/redis-2.2.8.tgz
tar zxpf redis*
cd redis*
phpize
make
make install
Then edit your php.ini file (/usr/local/lib/php.ini) and add
Code:
extension="redis.so"
near the other extensions

Unfortunately, since you don't have php 7 on your server, it's going to be a manual compile, unless you can figure out a way to get PECL to install an old version
 
  • Like
Reactions: Greg M

Greg M

Active Member
May 26, 2016
43
13
8
Glasgow, Scotland
cPanel Access Level
Root Administrator
from SSH (as root)
Code:
mkdir ~/redis
cd ~/redis
wget  https://pecl.php.net/get/redis-2.2.8.tgz
tar zxpf redis*
cd redis*
phpize
make
make install
Then edit your php.ini file (/usr/local/lib/php.ini) and add
Code:
extension="redis.so"
near the other extensions

Unfortunately, since you don't have php 7 on your server, it's going to be a manual compile, unless you can figure out a way to get PECL to install an old version


Thank you for this, however I ran into an issue, please see below:

Code:
[[email protected] redis]# wget  https://pecl.php.net/get/redis-2.2.8.tgz
--2016-06-17 16:11:23--  https://pecl.php.net/get/redis-2.2.8.tgz
Resolving pecl.php.net... 104.236.228.160
Connecting to pecl.php.net|104.236.228.160|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 192131 (188K) [application/octet-stream]
Saving to: `redis-2.2.8.tgz'

100%[==========================================================>] 192,131  521K/s  in 0.4s

2016-06-17 16:11:23 (521 KB/s) - `redis-2.2.8.tgz' saved [192131/192131]

[[email protected] redis]# tar zxpf redis*
[[email protected] redis]# cd redis*
[[email protected] redis-2.2.8]# phpize
Configuring for:
PHP Api Version:  20131106
Zend Module Api No:  20131226
Zend Extension Api No:  220131226
[[email protected] redis-2.2.8]# make
make: *** No targets specified and no makefile found.  Stop.
[[email protected] redis-2.2.8]# make install
make: *** No rule to make target `install'.  Stop.

I'm not really sure what I should do here



EDIT UPDATE:

I figured out that I needed to add the ./configure part before make so thank you to both for your comments I now have this installed and seems to be working !
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
Hello,

I'm happy to see the issue is now resolved. Thank you for updating us with the outcome.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,215
363
Is this a supported way to install Pecl items. Could fix my Imagick issue if it is.
Hello,

The manual installation method should work for any PECL module, however free to open a separate thread for the issue with Imagick if you require assistance with the installation. It's generally helpful to address issues where cPanel/WHM is not functioning as expected through a bug report or feature request.

Thank you.