I tried to enable object cache for wordpress by using Memcache. And I put object-cache.php into /wp-content/, which I get from Memcached Object Cache plugin.

And then PHP Fatal error: Class 'Memcache' not found occurred. So I install memcache extension by executing sudo yum -y install php-pecl-memcache and sudo service httpd restart. But nothing changed.

I also tried to install php-pecl-memcached, not php-pecl-memcache. But nothing had changed.

I confirmed that /etc/php.d/memcache.ini file existed and extension=memcache.so is loaded in the file.

Please give me an advice to solve this.

When I tried that for new EC2 instance, it worked well. So I guess my environment is preventing in some ways. Any ideas?

1

There are 1 answers

3
Santosh Jagtap On

fire the command dpkg -l | grep php5 and check the packages installed. Check for php5-memcache and php5-memcached.

If not installed then install those