To install this extension for PHP X.Y, 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 peclX.Y-sp install memcached
When you are shown the following prompts, you will want to press Enter to select the default option for all of the prompts except for enable sasl. When shown the enable sasl prompt, input "no", then press Enter.
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] : no enable sessions [yes] :
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/phpX.Y-sp/conf.d/memcached.ini" sudo service phpX.Y-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.