To install this extension for PHP 7.X, SSH in to your server as root and run the following commands:
sudo apt-get -y install gcc make autoconf libc-dev pkg-config sudo apt-get -y install zlib1g-dev sudo apt-get -y install libmemcached-dev sudo pecl7.X-sp install memcached
When you are shown the prompt
libmemcached directory [no] :
type or paste the following text exactly as shown and press Enter.
no --disable-memcached-sasl
That is, the entire line you'll see on your screen will be as follows once you press Enter.
libmemcached directory [no] : no --disable-memcached-sasl
Once installed, create a configuration file for the extension and restart PHP by running the following commands as root
sudo bash -c "echo extension=memcached.so > /etc/php7.X-sp/conf.d/memcached.ini" sudo service php7.X-fpm-sp restart
To install this extension, SSH in to your server as root and run the following commands:
sudo apt-get -y install gcc make autoconf libc-dev pkg-config sudo apt-get -y install zlib1g-dev sudo apt-get -y install libmemcached-dev sudo pecl5.X-sp install memcached-2.2.0
When you are shown the prompt
libmemcached directory [no] :
type or paste the following text exactly as shown and press Enter.
no --disable-memcached-sasl
That is, the entire line you'll see on your screen will be as follows once you press Enter.
libmemcached directory [no] : no --disable-memcached-sasl
Once installed, create a configuration file for the extension and restart PHP by running the following commands as root
sudo bash -c "echo extension=memcached.so > /etc/php5.X-sp/conf.d/memcached.ini" sudo service php5.X-fpm-sp restart
You can verify the memcached extension is installed correctly by running this command:
phpX.Y-sp -i | grep -i "memcached support"
You should see output like the following:
memcached support => enabled
To uninstall this extension, as root run the commands:
sudo rm /etc/phpX.Y-sp/conf.d/memcached.ini sudo peclX.Y-sp uninstall memcached
Next, restart PHP-FPM with the command:
sudo service phpX.Y-fpm-sp restart
To install this extension, SSH in to your server as root and run the following command:
sudo apt-get install gcc make autoconf libc-dev pkg-config sudo apt-get install zlib1g-dev sudo pecl5.X-sp install memcache
Once installed, create a configuration file for the extension and restart PHP.
sudo bash -c "echo extension=memcache.so > /etc/php5.X-sp/conf.d/memcache.ini" sudo service php5.X-fpm-sp restart
The memcache extension does not support PHP 7. For PHP 7 support, use the memcached extension shown above.