2

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 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

3 Comments

I installed php5-memcache and php5-memcached. And then restart Apache. But it still did not work.
$ php -m | grep memcache and I can get memcache memcached. memcache should be installed already. But wordpress output error log PHP Fatal error: Class 'Memcache' not found

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.