• Resolved Asheboro

    (@asheboro)


    When W3 Total Cache was updated to 0.9.5, connections to Memcache broke. This is because of a change in the code in W3TC which now checks for for the Memcached class (Memcached, with a D on the end). For those who don’t know, Memcache and Memcached are two different technologies, though they are both named very similarly. Memcache is supported on PHP 5.5 and 5.6 but not on PHP 7. Memcached is available on 5.5, 5.6, and PHP 7.

    So here is what happens. Pre 0.9.5, W3TC did not check for check the MemcacheD class. Because of this, it automatically went straight for Memcache if you gave it an IP or socket. The default socket for A2 is something like this:

    unix:///opt/memcached/run/username/memcached-1.sock

    Afte the update, W3TC started checking for MemcacheD first. This is what threw the train off the tracks, so to speak. MemcacheD uses a different path format than Memcache does. Because of this, the unix:// path that is default will not work. You will need to update your path to this:

    //opt/memcached/run/username/memcached-1.sock

    Notice how the only difference is to remove the unix:// part and leave a single slash at the start. Do that and you’re good to go. You can even use PHP 7 or 7.1 if available on your server. Just remember to set your ‘username’ correctly in the path.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Asheboro

    (@asheboro)

    And clearly, Grammarly was not kicking in when I wrote this.

    Short version:

    PHP 5.5 and 5.6 can use Memcache. Use this path:
    unix:///opt/memcached/run/username/memcached-1.sock

    PHP 5.5, 5.6, and 7 can use Memcached. Use this path:
    /opt/memcached/run/username/memcached-1.sock

    (In the first post there is an extra slash in the front of the second path listing that shouldn’t be there. You only need one slash.)

    Plugin Author A2 Hosting

    (@a2hosting)

    Glad to hear that fix is working. We currently do not support the 0.9.5.x branch of W3 Total Cache and will be issuing an update shortly to address this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to Fix the Memcache Error’ is closed to new replies.