The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cannot install PECL PHPRedis with PHP 5.6

Discussion in 'General Discussion' started by Greg M, Jun 16, 2016.

  1. Greg M

    Greg M Registered

    Joined:
    May 26, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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:
    [root@server ~]# 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.
     
  2. syslint

    syslint Well-Known Member

    Joined:
    Oct 9, 2006
    Messages:
    249
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    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
     
  3. twhiting9275

    twhiting9275 Well-Known Member

    Joined:
    Sep 26, 2002
    Messages:
    538
    Likes Received:
    15
    Trophy Points:
    18
    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
     
    Greg M likes this.
  4. Greg M

    Greg M Registered

    Joined:
    May 26, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Glasgow, Scotland
    cPanel Access Level:
    Root Administrator


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

    Code:
    [root@server 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]
    
    [root@server redis]# tar zxpf redis*
    [root@server redis]# cd redis*
    [root@server redis-2.2.8]# phpize
    Configuring for:
    PHP Api Version:  20131106
    Zend Module Api No:  20131226
    Zend Extension Api No:  220131226
    [root@server redis-2.2.8]# make
    make: *** No targets specified and no makefile found.  Stop.
    [root@server 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 !
     
    #4 Greg M, Jun 17, 2016
    Last edited by a moderator: Jun 17, 2016
  5. twhiting9275

    twhiting9275 Well-Known Member

    Joined:
    Sep 26, 2002
    Messages:
    538
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    Yikes! So sorry I forgot to add the configure command, my bad!
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  7. Brent Dacus

    Brent Dacus Member

    Joined:
    Feb 21, 2016
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Smyrna, TN
    cPanel Access Level:
    Root Administrator
    Is this a supported way to install Pecl items. Could fix my Imagick issue if it is.
     
  8. twhiting9275

    twhiting9275 Well-Known Member

    Joined:
    Sep 26, 2002
    Messages:
    538
    Likes Received:
    15
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Twitter:
    You can always install PECL items from the shell, should never have a problem doing so.
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page