Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Pending Publication [EA-8302] memcache/memcached extensions for PHP 7.2 and 7.3

Discussion in 'EasyApache' started by Mopar1973Man, Mar 9, 2018.

  1. Mopar1973Man

    Mopar1973Man Member

    Joined:
    Mar 9, 2018
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    New Meadows, Idaho
    cPanel Access Level:
    Website Owner
    I'm looking for updated instructions for installing memcached on EA4 and PHP7.2. So far I keep running into really old posts here dating back to 2011 in some cases. I'm looking for 2018 information. Being I've found the Memcached PECL file supports PHP 7.2 but it just creates a long string of errors in WHM attempting to install.
     
    #1 Mopar1973Man, Mar 9, 2018
    Last edited by a moderator: Mar 9, 2018
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,335
    Likes Received:
    2,162
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Mopar1973Man

    Mopar1973Man Member

    Joined:
    Mar 9, 2018
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    New Meadows, Idaho
    cPanel Access Level:
    Website Owner
    Doesn't answer my question. I'm looking to install Memcached with PHP 7.2. That link doesn't allow PHP7.2 installs.

    Here is the PECL page and its stable for PHP 7.2. So how do you install this?
    PECL :: Package :: memcached :: 3.0.4
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,335
    Likes Received:
    2,162
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    The EA4 experimental repo does not support the use of memcache/memcached with PHP 7.2 at this time. Have you tried the manual installation instructions on this thread? At the bottom of the first post, there's a button you can expand named "Previous Workaround Instructions". While it only extends to PHP 7.1, you can use the same method to install the PECL module PHP 7.2. As I understand, the latest stable build on the Memcached PECL module notes it supports PHP 7.2:

    GitHub - php-memcached-dev/php-memcached: memcached extension based on libmemcached library

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Mopar1973Man

    Mopar1973Man Member

    Joined:
    Mar 9, 2018
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    New Meadows, Idaho
    cPanel Access Level:
    Website Owner
    Ok. I finally made it out the other side and got it installed. The old article is barely enough to get it installed and working. Really have to watch the php version numbers in the path. Then you have to make sure to install igbinary. Again the key is watching the versions of software and php version in the path.

    It would really be helpful if you had an update on that forum post.
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,335
    Likes Received:
    2,162
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    I've updated the initial post in that thread to include PHP 7.2 instructions under the previously provided workaround section.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. massafiri

    massafiri Member

    Joined:
    Apr 8, 2016
    Messages:
    9
    Likes Received:
    1
    Trophy Points:
    1
    Location:
    Melbourne
    cPanel Access Level:
    Root Administrator
    Hey guys,

    For anyone else trying to install Memcache on 7.2 I found this guide very helpful.

    Tested on my server running CloudLinux, WHM76 and EasyApache4:
    grepitout.com/install-memcache-cpanel-server/
     
    #7 massafiri, Dec 18, 2018
    Last edited by a moderator: Jan 3, 2019
    Del Drago likes this.
  8. monkey64

    monkey64 Well-Known Member

    Joined:
    Nov 6, 2011
    Messages:
    99
    Likes Received:
    4
    Trophy Points:
    58
    cPanel Access Level:
    Root Administrator
    I recently installed the PHP Memcached extension in PHP 7.2. I also installed igbinary and msgpack (both optional) first by using WHM's PECL Installer, making sure to select "ea-php72" first.

    1. Download latest memcached (PHP) from : PECL :: Package :: memcached
    2. Untar to suitable destination (I used "/downloads") tar xf memcached-3.1.3.tgz" and navigate to the directory
    3. cd memcached-3.1.3
    4. phpize
    5. Run the following (note the correct path to ea-php72, --enable-memcached-igbinary=yes, --enable-memcached-msgpack=yes and --disable-memcached-sasl)

    Code:
    ./configure --with-php-config=/opt/cpanel/ea-php72/root/usr/bin/php-config --with-libmemcached-dir=no --with-zlib-dir=no --with-system-fastlz=no --enable-memcached-igbinary=yes --enable-memcached-msgpack=yes --enable-memcached-json=no --enable-memcached-protocol=no --enable-memcached-sasl=yes --enable-memcached-session=yes --disable-memcached-sasl
    6. Run "make". Should return the message "Libraries have been installed in: /downloads/memcached/memcached-3.1.3/modules"
    7. All we need is the "memcached.so" module which is in a subfolder called "modules" and needs to be copied to /opt/cpanel/ea-php72/root/usr/lib64/php/modules.
    8. Add these lines to the 7.2 php.ini version using the editor, checking first that they actually do exist!

    extension=igbinary.so
    extension=msgpack.so
    extension=memcached.so

    9. Restart Apache and you should be able to see the Memcached extension when you run phpinfo().

    Screen Shot 2019-01-03 at 10.22.08.png
     
    #8 monkey64, Jan 3, 2019
    Last edited: Jan 3, 2019
    cPanelMichael likes this.
  9. fisiculturismo

    fisiculturismo Member

    Joined:
    Mar 13, 2015
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    brazil
    cPanel Access Level:
    Website Owner
    When will be available php-memcache and php-memcached for php 7.3 in EasyApache?
     
  10. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,260
    Likes Received:
    480
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @fisiculturismo

    I can't give you a specific date but I do know that we are currently working on this for both PHP 7.2 and 7.3 and it should be available in the near future.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    fisiculturismo and cPanelMichael like this.
  11. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,335
    Likes Received:
    2,162
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello Everyone,

    I merged a couple of different threads on this topic here. We tracking the request for the memcache/memcached extensions for PHP 7.2 and PHP 7.3 in EasyApache 4 as part of case EA-8302. I'll update this thread with more information on the status of this case as it becomes available.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    fisiculturismo likes this.
  12. fisiculturismo

    fisiculturismo Member

    Joined:
    Mar 13, 2015
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    brazil
    cPanel Access Level:
    Website Owner
    Thanks! I hope we have it available soon!
     
  13. celiac101

    celiac101 Well-Known Member

    Joined:
    Dec 19, 2012
    Messages:
    85
    Likes Received:
    1
    Trophy Points:
    8
    cPanel Access Level:
    Website Owner
  14. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,335
    Likes Received:
    2,162
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @celiac101

    I moved your thread here. We're tracking the request for the memcache/memcached extensions for PHP 7.2 and PHP 7.3 in EasyApache 4 as part of case EA-8302. I don't have a specific time frame to offer at this time, however I'll continue to monitor the case and provide updates here as they become available.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. Bashed

    Bashed Well-Known Member

    Joined:
    Dec 18, 2013
    Messages:
    123
    Likes Received:
    4
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Need memcached installed on PHP 7.3 to utilize Cloudflare with Railgun.

    These instructions won't work on anything above 7.1: Different ways of installing memcached?

    Weird thing is, it says it's installed in SSH but doesn't show up in PHP Info.

    [root@server ~]# /opt/cpanel/ea-php71/root/usr/bin/php -m | grep memcached
    -bash: /opt/cpanel/ea-php71/root/usr/bin/php: No such file or directory
    [root@server ~]# /opt/cpanel/ea-php72/root/usr/bin/php -m | grep memcached
    [root@server ~]# /opt/cpanel/ea-php73/root/usr/bin/php -m | grep memcached

    [root@server ~]# yum -y install memcached
    Loaded plugins: fastestmirror, universal-hooks
    Loading mirror speeds from cached hostfile
    * EA4: 66.23.237.210
    * EA4-experimental: 66.23.237.210
    * cpanel-addons-production-feed: 66.23.237.210
    * cpanel-plugins: 66.23.237.210
    * base: mirror.umd.edu
    * epel: mirror.layeronline.com
    * extras: mirror.es.its.nyu.edu
    * remi-safe: mirror.team-cymru.com
    * updates: mirror.umd.edu
    Package memcached-1.4.15-10.el7_3.1.x86_64 already installed and latest version
    Nothing to do
     
  16. Bashed

    Bashed Well-Known Member

    Joined:
    Dec 18, 2013
    Messages:
    123
    Likes Received:
    4
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Tried this method too:

    /opt/cpanel/ea-php73/root/usr/bin/pecl install memcached

    checking for libmemcached location... found version 1.0.18, under /usr/local
    checking for libmemcached sasl.h requirement... no
    checking whether to enable sasl support... yes
    configure: error: no, libmemcached built with sasl disabled. Run configure with --disable-memcached-sasl or update libmemcached with sasl support
    ERROR: `/root/tmp/pear/memcached/configure --with-php-config=/opt/cpanel/ea-php73/root/usr/bin/php-config --with-libmemcached-dir=no --with-zlib-dir=no --with-system-fastlz=no --enable-memcached-igbinary=no --enable-memcached-msgpack=no --enable-memcached-json=no --enable-memcached-protocol=no --enable-memcached-sasl=yes --enable-memcached-session=yes' failed
     
  17. Bashed

    Bashed Well-Known Member

    Joined:
    Dec 18, 2013
    Messages:
    123
    Likes Received:
    4
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Also tried this:

    [root@server ~]# yum install cyrus-sasl-devel
    Loaded plugins: fastestmirror, universal-hooks
    Loading mirror speeds from cached hostfile
    * EA4: 66.23.237.210
    * EA4-experimental: 66.23.237.210
    * cpanel-addons-production-feed: 66.23.237.210
    * cpanel-plugins: 66.23.237.210
    * base: mirror.umd.edu
    * epel: mirror.layeronline.com
    * extras: mirror.es.its.nyu.edu
    * remi-safe: mirror.team-cymru.com
    * updates: mirror.umd.edu
    Package cyrus-sasl-devel-2.1.26-23.el7.x86_64 already installed and latest version
    Nothing to do


    and this method...


    [root@server ~]# /opt/cpanel/ea-php73/root/usr/bin/pecl install memcached --disable-memcached-sasl
    WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
    parsePackageName(): invalid package name "--disable-memcached-sasl" in "--disable-memcached-sasl"
    invalid package name/package file "--disable-memcached-sasl"
    pecl/memcached can optionally use PHP extension "igbinary" (version >= 2.0)
    pecl/memcached can optionally use PHP extension "msgpack" (version >= 2.0)
    downloading memcached-3.1.3.tgz ...
    Starting to download memcached-3.1.3.tgz (82,673 bytes)
    ....................done: 82,673 bytes
    15 source files, building
    running: phpize
    Configuring for:
    PHP Api Version: 20180731
    Zend Module Api No: 20180731
    Zend Extension Api No: 320180731
    libmemcached directory [no] : no --disable-memcached-sasl
    zlib directory [no] :
    use system fastlz [no] :
    enable igbinary serializer [no] :
    enable msgpack serializer [no] :
    enable json serializer [no] :
    enable server protocol [no] :
    enable sasl [yes] :
    enable sessions [yes] :
     
  18. Bashed

    Bashed Well-Known Member

    Joined:
    Dec 18, 2013
    Messages:
    123
    Likes Received:
    4
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    I just followed the steps and restarted apache. Installed for 7.3 not 7.2, right paths and all and no errors. Still doesn't show up in phpinfo output?
     
  19. Bashed

    Bashed Well-Known Member

    Joined:
    Dec 18, 2013
    Messages:
    123
    Likes Received:
    4
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Fixed. Have to restart php-fpm service.
     
    cPanelMichael likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice