Oluwatosin

Member
Jul 1, 2017
8
0
1
Lagos, Nigeria
cPanel Access Level
Root Administrator
Hi Everyone,

I am trying to install memcached on my server through the WHM/Cpanel interface, been able to correctly follow the steps over here

- Removed -

But it always end up with this error.

Code:
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
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.0.3.tgz ...
Starting to download memcached-3.0.3.tgz (77,310 bytes)
..................done: 77,310 bytes
15 source files, building
running: phpize
sh: phpize: command not found
ERROR: `phpize' failed
One major challenge is I don't even know how to interpret this error. I have googled and also checked Stackoverflow but none of the solutions suggested seem to work. Would appreciate assistance on this.

Thank you


Code:
/etc/redhat-release:CloudLinux Server release 6.9 (Igor Volk)
/usr/local/cpanel/version:11.64.0.29
/var/cpanel/envtype:standard
CPANEL=release
EasyApache4
 
Last edited by a moderator:

Oluwatosin

Member
Jul 1, 2017
8
0
1
Lagos, Nigeria
cPanel Access Level
Root Administrator
Are you using EA4 php in cloudlinux?

If yes try:
/opt/cpanel/ea-phpXX/root/usr/bin/pecl install memcached

where XX is the php version number
Yes, I am on EA4 php and cloudlinux, I just ran the command and here is what I got

Code:
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
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.0.3.tgz ...
Starting to download memcached-3.0.3.tgz (77,310 bytes)
..................done: 77,310 bytes
15 source files, building
running: phpize
sh: phpize: command not found
ERROR: `phpize' failed
 

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
806
156
168
New Jersey
cPanel Access Level
DataCenter Provider
Last edited:

Jcats

Well-Known Member
PartnerNOC
May 25, 2011
806
156
168
New Jersey
cPanel Access Level
DataCenter Provider
So that didn't work all that well, not sure if you saw my previous post before the edit, please use:

Code:
for phpver in for phpver in $(ls -1 /opt/cpanel/ |grep ea-php | sed 's/ea-php//g') ; do
cd ~
wget -O memcache.zip wget https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip
unzip memcache.zip
cd ~/pecl-memcache-* || exit
/opt/cpanel/ea-php"$phpver"/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php"$phpver"/root/usr/bin/php-config
make && make install
echo 'extension=memcache.so' > /opt/cpanel/ea-php"$phpver"/root/etc/php.d/memcache.ini
rm -rf ~/pecl-memcache-*
done
Code:
[email protected] [/]# for phpver in $(ls -1 /opt/cpanel/ |grep ea-php | sed 's/ea-php//g') ; do echo "PHP $phpver" ; /opt/cpanel/ea-php$phpver/root/usr/bin/php -i |grep "memcache support"; done
PHP 56/
memcache support => enabled
PHP 70/
memcache support => enabled
PHP 71/
memcache support => enabled
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,224
463
Hello,

Are you attempting to install the memcached PHP extension with CloudLinux and PHP Selector? If so, note that memcached is part of the alt-php package with CloudLinux. You can browse to "WHM >> LVE Manager", choose the "Selector" tab, and ensure "memcache" and "memcached" are enabled for the versions of PHP you want it installed on.

Thank you.
 

Droidism20011

Member
Jul 20, 2017
23
10
3
Amsterdam
cPanel Access Level
Root Administrator
Hi @cPanelMichael Back again ;-)

Since I am adding every module/option possible-my server will be so fast and secure in the end, that eventually I can't login or visit a webpage via the Tim Berners Lee route-I would like to use memcache and memcached too.

Just to confirm:
My VPS is running Cl with mod_lsapi, cageFS and so on. Is it just a matter of indeed choosing/installing the CL alt-php versions and I get the memcache(d) modules installed?

From my limited knowledge I understand that @Jcats wget commands downloads alternative versions for php7.x, developed by a Slovakian hosting company, that enables memcache(d) to work with php7.x.

I can always copy/paste it and see into what rabbithole this sucks me, but since I just won a month's free VPS hosting from my provider after winning the most laughed at error log files in the office award, I feel honoured, but at the same time became a bit more conservative in my workflow.

Thanks again in advance for helping me out.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,224
463
My VPS is running Cl with mod_lsapi, cageFS and so on. Is it just a matter of indeed choosing/installing the CL alt-php versions and I get the memcache(d) modules installed?
Hello,

Yes, as long as you've already installed and setup the Memcached daemon on the server, you should be able to simply enable those PHP extensions by browsing to "WHM >> LVE Manager", choosing the "Selector" tab, and ensuring "memcache" and "memcached" are enabled for the versions of PHP you want it installed on. The following document is useful when using mod_lsapi:

CloudLinux Documentation

It provides some basic information about how it works, and includes a FAQ section to help answer common questions.

Thank you.