How to configure memcached on linux ami ec2 instance

pcdhan picture pcdhan · Aug 4, 2013 · Viewed 9.3k times · Source

I have linux ami running on ec2 instance, I am trying to install memcached but it failed display in "phpinfo()", here is what i have done so far.

installed memcached by :

yum install memcached

Added following line in my php.ini

extension=memcached.so

started memcached:

service memcached start

restarted apache

service httpd restart

When i do phpinfo(), memcached is not listed. please help.

Answer

datasage picture datasage · Aug 5, 2013

You have installed the daemon, but not the php extension. You have two options.

  1. Install via package manager if available yum install php-pecl-memcached.
  2. Install via pecl pecl install memcached. You may need to install gcc and php-devel packages for this option to work.