Viewing 15 replies - 1 through 15 (of 24 total)
  • Not sure if this will resolve the APC issue but there is a slight tweak u need to do to get php 7 to work with w3tc:

    1. Open: /wp-content/plugins/w3-total-cache/lib/W3/Plugin/TotalCache.php
    2. Go to line 512
    3. Change &$buffer to be $buffer. So you are removing the ampersand (&).
    4. Save (and upload change to website)
    Thread Starter shade1973

    (@shade1973)

    No, that did not change anything. It still dont see APCU.

    Same thing here… I have PHP 7 and memcache enabled on my web server. W3 Total Cache cannot detect that memcache is on.

    I switched back to PHP 5.6 and memcache works with w3 Total

    Same thing here… I have PHP 7 and memcache enabled on my web server. W3 Total Cache cannot detect that memcache is on.

    I switched back to PHP 5.6 and memcache works with w3 Total

    Pretty it’s sure because w3tc doesn’t have support for the PHP extension ‘memcached’, it only supports ‘memcache’. The PHP extension is used to communicate through an API to use the actual memcached server itself. The PHP extension ‘memcache’ doesn’t work with PHP7, not that I can find anyway and only the PHP extension ‘memcached’ works with PHP7. This completely breaks the ability to use memcached with w3tc. Hopefully the developers can correct me if I am wrong.

    when memcached is supported ?

    Thread Starter shade1973

    (@shade1973)

    I don’t use memcache, this thread is about using W3TC on PHP7 together with APCu.

    Make a new thread about memcache.

    Same problem with APCu here. The field is not selecable. APCu is definitely enabled..

    PHP: 7.0.2
    W3: 0.9.4.1

    I think I’ve found the problem. In php 7 the extension is now called apcu.so instead of apc.so. There’s a pecl package for backward compatibility (https://pecl.php.net/package/apcu_bc), but this is just a temporary solution.

    I can’t install the PECL package, since it’s not available in my host provider. But I got W3 Total Cache to work with APCu, apparently with no side effect, by changing the apc_* function calls to apcu_*.

    More details in this post:
    https://www.skooterblog.com/2016/02/23/w3-total-cache-com-php-7-e-apcu/

    @fbreve, I’ve tried following the instructions on the link provided but my website doesn’t seem to recognize APCu. Any chance you could provide me a little insight to getting this to work?

    Did you check if the APCu module is actually working on your server?

    Ugh, you’re right! Ha, I just migrated to a different server and forgot to install it.

    Got it working! Thank you so much.

    Does anyone know if Total Cache fully supports/recognizes APCu when used with php 5.6? Are there any hacks required so Total Cache “sees” APCu?

    I know there are some hacks and a backward compatibility module required for php 7 or newer. Plus, the backward compatibility module is only in beta which I wouldn’t want to do. I just want to know how well Total Cache works with stable php 5.6 and APCu for object/database caching. I will be using OpCache for php caching.

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘W3TC with PHP 7 and APCu 5.1.2’ is closed to new replies.