Installing memcache and memcached with EasyApache4

GeoffS.

Member
Dec 11, 2012
11
5
78
cPanel Access Level
Root Administrator
Hello Everyone!

PHP extensions for Memcache and Memcached are now available in the EasyApache 4 Experimental Repository. Here's the latest comment regarding this change from the memcached-in-easyapache4 feature request:

[email protected]

This is now available in the experimental repo of EasyApache 4. There is no SASL, and no per-user init files, which means it is not considered ready for shared environments. These RPMs are likely to remain in the experimental repo for quite a while, as we aren't likely to get back to adjust those things soon, but I figured I'd share these here anyway.
Once you have reviewed the instructions and warnings on the Experimental Repository document, you can choose to enable the repo and install the packages via the following commands:

Code:
yum install ea4-experimental
yum install ea-php56-php-memcache
yum install ea-php56-php-memcached
Replace "php56" with the version of PHP you want to install the extensions on (e.g. php54, php55, php70).

To installed the Memcached daemon, run this command:

Code:
yum install ea-memcached
Let us know if you have any questions.

Thanks!

Note: The previous workaround instructions are also unsupported, but are provided below for reference:

The following thread is intended to offer step-by-step instructions to administrators that would like to install the Memcached and Memcache PECL modules on EasyApache 4. I encourage anyone reviewing this thread to vote and add feedback to the following feature request if you'd like to see these options made available as native PHP options in EasyApache 4:

MemcacheD in EasyApache4

To start, here's some background information about the packages installed with these instructions:

libmemcached is an open source C/C++ client library and tools for the memcached server (memcached - a distributed memory object caching system). It has been designed to be light on memory usage, thread safe, and provide full access to server side methods.

The PECL memcached package is an extension that uses the libmemcached library to provide API for communicating with memcached servers.

The PECL memcache package is an extension allows you to work with memcached through handy OO and procedural interfaces.

This guide does not cover installing the Memcached daemon.

To begin the installation, first install cyrus-sasl-devel and lib-memcached using the following commands:

Code:
yum install cyrus-sasl-devel
mkdir /root/lib-memcached-install
cd /root/lib-memcached-install
wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
tar -xvzf libmemcached-1.0.18.tar.gz
cd libmemcached-1.0.18
./configure
make && make install

Next, install the Memcached Pecl Module for each version of PHP active on your system.

Note: Please see the post here if you are receiving popen() has been disabled for security reasons errors.

Code:
mkdir /root/memcached-php54-pecl
cd /root/memcached-php54-pecl
/opt/cpanel/ea-php54/root/usr/bin/pecl download https://pecl.php.net/get/memcached-2.2.0.tgz
tar -xvf memcached-2.2.0.tgz
cd memcached-2.2.0
/opt/cpanel/ea-php54/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php54/root/usr/bin/php-config
make && make install
echo 'extension=memcached.so' >> /opt/cpanel/ea-php54/root/etc/php.d/memcached.ini

Code:
mkdir /root/memcached-php55-pecl
cd /root/memcached-php55-pecl
/opt/cpanel/ea-php55/root/usr/bin/pecl download https://pecl.php.net/get/memcached-2.2.0.tgz
tar -xvf memcached-2.2.0.tgz
cd memcached-2.2.0
/opt/cpanel/ea-php55/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php55/root/usr/bin/php-config
make && make install
echo 'extension=memcached.so' >> /opt/cpanel/ea-php55/root/etc/php.d/memcached.ini

Code:
mkdir /root/memcached-php56-pecl
cd /root/memcached-php56-pecl
/opt/cpanel/ea-php56/root/usr/bin/pecl download https://pecl.php.net/get/memcached-2.2.0.tgz
tar -xvf memcached-2.2.0.tgz
cd memcached-2.2.0
/opt/cpanel/ea-php56/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php56/root/usr/bin/php-config
make && make install
echo 'extension=memcached.so' >> /opt/cpanel/ea-php56/root/etc/php.d/memcached.ini

Code:
mkdir /root/memcached-php70-pecl
cd /root/memcached-php70-pecl
/opt/cpanel/ea-php70/root/usr/bin/pecl download memcached
tar -xvf memcached*
cd memcached*
/opt/cpanel/ea-php70/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php70/root/usr/bin/php-config
make && make install
echo 'extension=memcached.so' >> /opt/cpanel/ea-php70/root/etc/php.d/memcached.ini

Code:
mkdir /root/memcached-php71-pecl
cd /root/memcached-php71-pecl
/opt/cpanel/ea-php71/root/usr/bin/pecl download memcached
tar -xvf memcached*
cd memcached*
/opt/cpanel/ea-php71/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php71/root/usr/bin/php-config
make && make install
echo 'extension=memcached.so' >> /opt/cpanel/ea-php71/root/etc/php.d/memcached.ini

Code:
mkdir /root/memcached-php72-pecl
cd /root/memcached-php72-pecl
/opt/cpanel/ea-php72/root/usr/bin/pecl download memcached
tar -xvf memcached*
cd memcached*
/opt/cpanel/ea-php72/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php72/root/usr/bin/php-config
make && make install
echo 'extension=memcached.so' >> /opt/cpanel/ea-php72/root/etc/php.d/memcached.ini

Then, install the Memcache PECL module for each version of PHP active on your system.
Note: Please see the post here if you are receiving popen() has been disabled for security reasons errors.

Code:
/opt/cpanel/ea-php54/root/usr/bin/pecl install memcache
echo 'extension=memcache.so' >> /opt/cpanel/ea-php54/root/etc/php.d/memcache.ini

Code:
/opt/cpanel/ea-php55/root/usr/bin/pecl install memcache
echo 'extension=memcache.so' >> /opt/cpanel/ea-php55/root/etc/php.d/memcache.ini

Code:
/opt/cpanel/ea-php56/root/usr/bin/pecl install memcache
echo 'extension=memcache.so' >> /opt/cpanel/ea-php56/root/etc/php.d/memcache.ini

Code:
mkdir /root/memcache-php70-pecl
cd /root/memcache-php70-pecl
wget https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip
unzip NON_BLOCKING_IO_php7.zip
cd pecl-memcache-NON_BLOCKING_IO_php7
/opt/cpanel/ea-php70/root/usr/bin/phpize && ./configure --enable-memcache --with-php-config=/opt/cpanel/ea-php70/root/usr/bin/php-config && make
cp modules/memcache.so /opt/cpanel/ea-php70/root/usr/lib64/php/modules/
echo 'extension=memcache.so' >/opt/cpanel/ea-php70/root/etc/php.d/memcache.ini

Code:
mkdir /root/memcache-php71-pecl
cd /root/memcache-php71-pecl
wget https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip
unzip NON_BLOCKING_IO_php7.zip
cd pecl-memcache-NON_BLOCKING_IO_php7
/opt/cpanel/ea-php71/root/usr/bin/phpize && ./configure --enable-memcache --with-php-config=/opt/cpanel/ea-php71/root/usr/bin/php-config && make
cp modules/memcache.so /opt/cpanel/ea-php71/root/usr/lib64/php/modules/
echo 'extension=memcache.so' >/opt/cpanel/ea-php71/root/etc/php.d/memcache.ini

Code:
mkdir /root/memcache-php72-pecl
cd /root/memcache-php72-pecl
wget https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip
unzip NON_BLOCKING_IO_php7.zip
cd pecl-memcache-NON_BLOCKING_IO_php7
/opt/cpanel/ea-php72/root/usr/bin/phpize && ./configure --enable-memcache --with-php-config=/opt/cpanel/ea-php72/root/usr/bin/php-config && make
cp modules/memcache.so /opt/cpanel/ea-php72/root/usr/lib64/php/modules/
echo 'extension=memcache.so' >/opt/cpanel/ea-php72/root/etc/php.d/memcache.ini

Finally, verify each version of PHP active on your system includes the Memcached and Memcache modules:

Code:
/opt/cpanel/ea-php54/root/usr/bin/php -m |grep memcache
/opt/cpanel/ea-php55/root/usr/bin/php -m |grep memcache
/opt/cpanel/ea-php56/root/usr/bin/php -m |grep memcache
/opt/cpanel/ea-php70/root/usr/bin/php -m |grep memcache
/opt/cpanel/ea-php71/root/usr/bin/php -m |grep memcache
/opt/cpanel/ea-php72/root/usr/bin/php -m |grep memcache
Here's an example of the output you should see:

Code:
# /opt/cpanel/ea-php70/root/usr/bin/php -m |grep memcache
memcache
memcached
Let us know if you have any questions about these instructions.

Thank you.
 
Last edited by a moderator:

cPMarkF

*nix Technical Analyst
Staff member
Feb 4, 2013
18
8
78
cPanel Access Level
Root Administrator
The following post is intended for the previous workaround instructions for the Memcache and Memcached PHP extensions in EasyApache 4 created prior to the existence of the packaged offered in the EA4 Experimental Repo:

Let's have more fun. Need igbinary support in memcached? If you've done all the steps above, you need to remove the source directory of memcached-2.2.0 and untar the tarball again to get a fresh directory.

Download and install igbinary from PECL:

Code:
wget https://pecl.php.net/get/igbinary-1.2.1.tgz
tar -vxzf igbinary-1.2.1.tgz
cd igbinary-1.2.1
/opt/cpanel/ea-php56/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php56/root/usr/bin/php-config
make && make install

Create your igbinary.ini

Code:
echo 'extension=igbinary.so' >> /opt/cpanel/ea-php56/root/etc/php.d/igbinary.ini

Go into your newly re-extracted memached-2.2.0 directory and rebuild memcached, enabling igbinary support (note: if you've already built memcached using the previous steps outlined above in this thread, you do not need to create or echo the module into the memcached.ini again)

Code:
cd memcached-2.2.0
/opt/cpanel/ea-php56/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php56/root/usr/bin/php-config --enable-memcached-igbinary

During the config.status output, you should see these lines:

Code:
checking whether to enable memcached igbinary serializer support... yes
checking for memcached igbinary support... enabled

If not, make sure you followed the steps above to install igbinary. If so, then:

Code:
make && make install

Afterwards, you should see igbinary support not only in PHP, but also for memcached:

Code:
[17:21:38 sg [email protected] ~/memcached-2.2.0]cPs# php -i | grep igbinary
/opt/cpanel/ea-php56/root/etc/php.d/igbinary.ini,
igbinary
igbinary support => enabled
igbinary version => 1.2.1
igbinary APC serializer ABI => 0
igbinary session support => yes
igbinary.compact_strings => On => On
igbinary support => yes
memcached.serializer => igbinary => igbinary
Registered serializer handlers => php_serialize php php_binary igbinary wddx
Hope this helps!
 
Last edited by a moderator:
  • Like
Reactions: cPanelMichael

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
Hello,

We've updated this thread to include information about packages available in the EA4 experimental repo, and to update the manual workaround instructions to address some of the common problems reported during the installation process. Some of the previous posts to this thread were removed, with the solutions included in the updated instructions. Let us know if you have any questions.

Thanks!
 

Nirjonadda

Well-Known Member
May 8, 2013
660
17
68
cPanel Access Level
Root Administrator
Hello,

We've updated this thread to include information about packages available in the EA4 experimental repo, and to update the manual workaround instructions to address some of the common problems reported during the installation process. Some of the previous posts to this thread were removed, with the solutions included in the updated instructions. Let us know if you have any questions.

Thanks!
How to uninstall memcache-php71-pecl (manual install)

Why EA 4 Using memcached Version 3.0.2? When memcached 3.0.3 stable Version? Do we need uninstall “PHP Pecl” Installer memcached (3.0.3) ?
 

JacobPerkins

Well-Known Member
May 2, 2014
617
97
103
cPanel Access Level
DataCenter Provider
Twitter
How to uninstall memcache-php71-pecl (manual install)

Why EA 4 Using memcached Version 3.0.2? When memcached 3.0.3 stable Version? Do we need uninstall “PHP Pecl” Installer memcached (3.0.3) ?
Thanks for the feedback. This is an experimental module, so it won't receive full attention until we send it through the team and full QA processes. I'll attempt to get these modules update to the latest versions in the next day or so.

Also, I do believe you will need to uninstall the previous module you had installed, to ensure no conflicts.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
Then how to uninstall previous modules? I have installed this both modules with this this thread manually installing tutorials.
Hello,

You can remove the memcache.so module and memcache.ini/memcached.ini files. For instance, if you installed the Memcache and Memcached PECL modules for PHP 7.1, you'd run the following commands:

Code:
rm /opt/cpanel/ea-php71/root/usr/lib64/php/modules/memcache.so
rm /opt/cpanel/ea-php71/root/etc/php.d/memcache.ini
rm /opt/cpanel/ea-php71/root/etc/php.d/memcached.ini
Thank you.
 

Nirjonadda

Well-Known Member
May 8, 2013
660
17
68
cPanel Access Level
Root Administrator
Hello,

You can remove the memcache.so module and memcache.ini/memcached.ini files. For instance, if you installed the Memcache and Memcached PECL modules for PHP 7.1, you'd run the following commands:

Code:
rm /opt/cpanel/ea-php71/root/usr/lib64/php/modules/memcache.so
rm /opt/cpanel/ea-php71/root/etc/php.d/memcache.ini
rm /opt/cpanel/ea-php71/root/etc/php.d/memcached.ini
Thank you.
Still can not remove Memcache PECL modules for PHP 7.1, I have installed Memcache from this follow the steps listed below.

Code:
mkdir /root/memcache-php71-pecl
cd /root/memcache-php71-pecl
wget https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip
unzip NON_BLOCKING_IO_php7.zip
cd pecl-memcache-NON_BLOCKING_IO_php7
/opt/cpanel/ea-php71/root/usr/bin/phpize && ./configure --enable-memcache --with-php-config=/opt/cpanel/ea-php71/root/usr/bin/php-config && make
cp modules/memcache.so /opt/cpanel/ea-php71/root/usr/lib64/php/modules/
echo 'extension=memcache.so' >/opt/cpanel/ea-php71/root/etc/php.d/memcache.ini
 

Nirjonadda

Well-Known Member
May 8, 2013
660
17
68
cPanel Access Level
Root Administrator
Code:
[2017-03-23 23:40:27 +0600] info [xml-api]   Installing : ea-php71-php-memcached-3.0.2-1.1.9.cpanel.x86_64             1/2
[2017-03-23 23:40:27 +0600] info [xml-api]   Installing : ea-php71-php-memcache-3.0.8-1.3.8.cpanel.x86_64              2/2Purging all relevant cached command results
@cPanelMichael Installed memcache-3.0.8 but still are showing Manual Installation Version 3.0.9-dev


Screenshot_1.png
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
@cPanelMichael Installed memcache-3.0.8 but still are showing Manual Installation Version 3.0.9-dev
That's actually the version provided by the RPM published to the EA4 experimental repo. Internal case EA-6097 is open to address that version number mismatch. I'll update this thread with more information on case EA-6097 once it's available, but keep in mind the RPM is still considered experimental.

Thank you.
 

fast lane

Registered
May 30, 2008
3
0
51
Hello Everyone!

PHP extensions for Memcache and Memcached are now available in the EasyApache 4 Experimental Repository. Here's the latest comment regarding this change from the memcached-in-easyapache4 feature request:



Once you have reviewed the instructions and warnings on the Experimental Repository document, you can choose to enable the repo and install the packages via the following commands:

Code:
yum install ea4-experimental
yum install ea-php56-php-memcache
yum install ea-php56-php-memcached
Replace "php56" with the version of PHP you want to install the extensions on (e.g. php54, php55, php70).

Let us know if you have any questions.

Thanks!

Note: The previous workaround instructions are also unsupported, but are provided below for reference:

The following thread is intended to offer step-by-step instructions to administrators that would like to install the Memcached and Memcache PECL modules on EasyApache 4. I encourage anyone reviewing this thread to vote and add feedback to the following feature request if you'd like to see these options made available as native PHP options in EasyApache 4:

MemcacheD in EasyApache4

To start, here's some background information about the packages installed with these instructions:

libmemcached is an open source C/C++ client library and tools for the memcached server (memcached - a distributed memory object caching system). It has been designed to be light on memory usage, thread safe, and provide full access to server side methods.

The PECL memcached package is an extension that uses the libmemcached library to provide API for communicating with memcached servers.

The PECL memcache package is an extension allows you to work with memcached through handy OO and procedural interfaces.

This guide does not cover installing the Memcached daemon.

To begin the installation, first install cyrus-sasl-devel and lib-memcached using the following commands:

Code:
yum install cyrus-sasl-devel
mkdir /root/lib-memcached-install
cd /root/lib-memcached-install
wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz
tar -xvzf libmemcached-1.0.18.tar.gz
cd libmemcached-1.0.18
./configure
make && make install

Next, install the Memcached Pecl Module for each version of PHP active on your system.

Note: Please see the post here if you are receiving popen() has been disabled for security reasons errors.

Code:
mkdir /root/memcached-php54-pecl
cd /root/memcached-php54-pecl
/opt/cpanel/ea-php54/root/usr/bin/pecl download https://pecl.php.net/get/memcached-2.2.0.tgz
tar -xvf memcached-2.2.0.tgz
cd memcached-2.2.0
/opt/cpanel/ea-php54/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php54/root/usr/bin/php-config
make && make install
echo 'extension=memcached.so' >> /opt/cpanel/ea-php54/root/etc/php.d/memcached.ini

Code:
mkdir /root/memcached-php55-pecl
cd /root/memcached-php55-pecl
/opt/cpanel/ea-php55/root/usr/bin/pecl download https://pecl.php.net/get/memcached-2.2.0.tgz
tar -xvf memcached-2.2.0.tgz
cd memcached-2.2.0
/opt/cpanel/ea-php55/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php55/root/usr/bin/php-config
make && make install
echo 'extension=memcached.so' >> /opt/cpanel/ea-php55/root/etc/php.d/memcached.ini

Code:
mkdir /root/memcached-php56-pecl
cd /root/memcached-php56-pecl
/opt/cpanel/ea-php56/root/usr/bin/pecl download https://pecl.php.net/get/memcached-2.2.0.tgz
tar -xvf memcached-2.2.0.tgz
cd memcached-2.2.0
/opt/cpanel/ea-php56/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php56/root/usr/bin/php-config
make && make install
echo 'extension=memcached.so' >> /opt/cpanel/ea-php56/root/etc/php.d/memcached.ini

Code:
mkdir /root/memcached-php70-pecl
cd /root/memcached-php70-pecl
/opt/cpanel/ea-php70/root/usr/bin/pecl download memcached
tar -xvf memcached*
cd memcached*
/opt/cpanel/ea-php70/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php70/root/usr/bin/php-config
make && make install
echo 'extension=memcached.so' >> /opt/cpanel/ea-php70/root/etc/php.d/memcached.ini

Code:
mkdir /root/memcached-php71-pecl
cd /root/memcached-php71-pecl
/opt/cpanel/ea-php71/root/usr/bin/pecl download memcached
tar -xvf memcached*
cd memcached*
/opt/cpanel/ea-php71/root/usr/bin/phpize
./configure --with-php-config=/opt/cpanel/ea-php71/root/usr/bin/php-config
make && make install
echo 'extension=memcached.so' >> /opt/cpanel/ea-php71/root/etc/php.d/memcached.ini

Then, install the Memcache PECL module for each version of PHP active on your system.
Note: Please see the post here if you are receiving popen() has been disabled for security reasons errors.

Code:
/opt/cpanel/ea-php54/root/usr/bin/pecl install memcache
echo 'extension=memcache.so' >> /opt/cpanel/ea-php54/root/etc/php.d/memcache.ini

Code:
/opt/cpanel/ea-php55/root/usr/bin/pecl install memcache
echo 'extension=memcache.so' >> /opt/cpanel/ea-php55/root/etc/php.d/memcache.ini

Code:
/opt/cpanel/ea-php56/root/usr/bin/pecl install memcache
echo 'extension=memcache.so' >> /opt/cpanel/ea-php56/root/etc/php.d/memcache.ini

Code:
mkdir /root/memcache-php70-pecl
cd /root/memcache-php70-pecl
wget https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip
unzip NON_BLOCKING_IO_php7.zip
cd pecl-memcache-NON_BLOCKING_IO_php7
/opt/cpanel/ea-php70/root/usr/bin/phpize && ./configure --enable-memcache --with-php-config=/opt/cpanel/ea-php70/root/usr/bin/php-config && make
cp modules/memcache.so /opt/cpanel/ea-php70/root/usr/lib64/php/modules/
echo 'extension=memcache.so' >/opt/cpanel/ea-php70/root/etc/php.d/memcache.ini

Code:
mkdir /root/memcache-php71-pecl
cd /root/memcache-php71-pecl
wget https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip
unzip NON_BLOCKING_IO_php7.zip
cd pecl-memcache-NON_BLOCKING_IO_php7
/opt/cpanel/ea-php71/root/usr/bin/phpize && ./configure --enable-memcache --with-php-config=/opt/cpanel/ea-php71/root/usr/bin/php-config && make
cp modules/memcache.so /opt/cpanel/ea-php71/root/usr/lib64/php/modules/
echo 'extension=memcache.so' >/opt/cpanel/ea-php71/root/etc/php.d/memcache.ini

Finally, verify each version of PHP active on your system includes the Memcached and Memcache modules:

Code:
/opt/cpanel/ea-php54/root/usr/bin/php -m |grep memcache
/opt/cpanel/ea-php55/root/usr/bin/php -m |grep memcache
/opt/cpanel/ea-php56/root/usr/bin/php -m |grep memcache
/opt/cpanel/ea-php70/root/usr/bin/php -m |grep memcache
/opt/cpanel/ea-php71/root/usr/bin/php -m |grep memcache
Here's an example of the output you should see:

Code:
# /opt/cpanel/ea-php70/root/usr/bin/php -m |grep memcache
memcache
memcached
Let us know if you have any questions about these instructions.

Thank you.
After following these instructions I can't find the memcached config file anywhere. Memcached appears to be running but I can't telnet into it (telnet localhost 11211). Help?

Also, for future reference how would I uninstall memcached (having followed your revised install instructions with the experimental repo).
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
After following these instructions I can't find the memcached config file anywhere. Memcached appears to be running but I can't telnet into it (telnet localhost 11211). Help?
The daemon itself isn't offered through cPanel, but is generally started with a command such as:

Code:
memcached -d -u nobody -m 1024 127.0.0.1 -p 11211
As far as configuring it, there's a third-party URL that discusses this at:

Memcache basic configuration

Also, for future reference how would I uninstall memcached (having followed your revised install instructions with the experimental repo).
You'd simply remove the packages with the YUM command:

Code:
yum remove ea-php56-php-memcache
yum remove ea-php56-php-memcached
Thank you.
 

fahl

Active Member
Jul 30, 2008
34
2
58
I have installed as in first post.mem.jpg
But no memcach.cfg in etc/sysconfig & using
memcached -d -u nobody -m 1024 127.0.0.1 -p 11211
i get following error
-bash: memcached: command not found
Help needed please
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
Hello @fahl,

What method did you use to install the Memcached daemon? This is separate to the PHP extensions referenced on this thread, and typically installed with a command such as:

Code:
yum install memcached
Thank you.
 

fahl

Active Member
Jul 30, 2008
34
2
58
Getting this error when saving php.ini

Code:
API failure: (XID cnefq8) 2 errors occurred: Error #1: The php.ini file contains an invalid line: “Module Settings”. Error #2: The php.ini file contains an invalid line: “echo 'extension=memcache.so'”.
Placed at bottom of php.ini

Code:
; this value may still be overridden on a per-stream basis via the "capath"
; SSL stream context option.
;openssl.capath=

; Local Variables:
; tab-width: 4

echo 'extension=memcache.so'

; End:
What am i doing wrong please

Running php70
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
echo 'extension=memcache.so'
This is the actual command to run as opposed to the entry that should appear in the /opt/cpanel/ea-php70/root/etc/php.d/memcached.ini file. This is the output you should see when running the "cat /opt/cpanel/ea-php70/root/etc/php.d/memcached.ini" command (when using the manual installations instructions):

Code:
extension=memcached.so
Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
This issue still are not fixed ?
That case is still open, and the module is still only available from the experimental repo. I'll update this thread as soon as there's progress on the case.

Thank you.
 

Nirjonadda

Well-Known Member
May 8, 2013
660
17
68
cPanel Access Level
Root Administrator
@cPanelMichael I am getting To install the Memcached daemon with run this command:

Code:
yum install ea-memcached
Error Log:

Code:
Transaction check error:
  file /usr/bin/memcached from install of ea-memcached-1.4.35-3.4.5.cpanel.x86_64 conflicts with file from package memcached-0:1.4.15-10.el7_3.1.x86_64
  file /usr/share/man/man1/memcached.1.gz from install of ea-memcached-1.4.35-3.4.5.cpanel.x86_64 conflicts with file from package memcached-0:1.4.15-10.el7_3.1.x86_64

Error Summary
I Think Its problem that previous install command "yum install memcached" ? Please let me know this fix.

OK, I do remove "yum remove memcached" then Installed "yum install ea-memcached" But now no more working memcached and getting error Can't connect to:127.0.0.1:11211, Now we have removed "yum remove ea-memcached" then Installed "yum install memcached" then all are started working. Please let me know that why Memcached daemon "yum install ea-memcached" are not working?
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,911
2,234
363
But now no more working memcached and getting error Can't connect to:127.0.0.1:11211
You'd need to manually start it using a command like the one referenced earlier in this thread. EX:

memcached -d -u nobody -m 1024 127.0.0.1 -p 11211
Keep in mind this module is still considered experimental and thus is not yet ready for production machines.

Thank you.