1

I have the Memcached Daemon running on my server but some plugins for wordpress don't see it (i.e. W3 total Cache).

Do I need to configure it as a PHP extension to use it?

I've found this answer: W3 Total Cache doesn't detect memcached and this article https://www.howtoforge.com/installing-memcached-and-the-php5-memcache-module-on-debian-etch-apache2

but some explanation would be very useful

1
  • 1
    The difficulty and effort required to use it rise dramatically if you don't use the PHP extension
    – Tom J Nowell
    Sep 29, 2016 at 12:34

2 Answers 2

1

This depends on what is it that you are trying to do/use. In theory the protocol used to communicate with memcached server is not very complex and can be implemented in PHP, and therefor as a plugin. In practice you might want to prevent collisions of multiple processes writing at the same time to the cahce which will most likely require the access to the multi tasking API of the OS, something that is not built-in in the default PHP modules and will require you to use additional modules in any case. (there is also probably some performance argument that can be made here between running C and PHP code, but I am not sure how important it is).

Having it as module also let you as the server admin "break out" of whatever restrictions you put on the PHP code in the php.ini and other setting files (in theory you can block the ability of the PHP application to connect anywhere, although I never heard of anyone doing that)

2
  • But the standard WP plugins require it being installed as a module?
    – Revious
    Sep 29, 2016 at 12:23
  • 1
    yes. it is the easier path to follow ;) and usually if you have the memcached server you have the module or the ability to install it Sep 29, 2016 at 12:25
0

Yes, having it installed as a PHP extension is needed to have it working with memcached, for example. It makes life really really easier.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.