ElastiCache Cluster PHP 7 gives your site a real speed boost.
W3C Totalt Cache has a “Node Auto Discovery” feature that simplifies the process of using Amazon ElastiCache.
Follow the instructions described at:
Installing the ElastiCache Cluster Client for PHP 7
Folo
Do NOT run the command
sudo apt-get install gcc g++
This is not needed.
Add to the Apache php.ini and not the CLI php.ini
If you add the statement to the PHP.INI for CLI – Command Line Interface -, then W3C Totalt Cache ” Node Auto Discovery:” is not able to locate the ElastiCache servers. You need to add the statement to the “apache2 php.ini” file. By following this process:
Download the file from the “ElastiCache” section at https://aws.amazon.com
Use a SFTP client to upload the file to
/home/ubuntu/tmp/
Extract the file to access the module.
tar -xvzf AmazonElastiCacheClusterClient-2.0.3-PHP70-64bit-libmemcached-1.0.18.tar.gz
Go to the unzipped file
cd artifact
Copy the module to the correct folder:
sudo cp amazon-elasticache-cluster-client.so /usr/lib/php/20151012/amazon-elasticache-cluster-client.so
Add the following statement to php.ini for Apache
extension=amazon-elasticache-cluster-client.so
To open the PHP.INI file type:
sudo nano /etc/php/7.0/apache2/php.ini
Then restart Apache
sudo service apache2 restart
To uninstall the old client
The Google PageSpeed Apache module at the time of writing only supports Memcached.
You should remove the old general Memcache if already installed on your server.
sudo apt-get remove PHP-Memcache sudo service apache2 restart
It is not necessary to install the old memcache client when using the Amazon Memcached client as described here