Search code examples
phpsymfonyapc

Symfony / PHP7 APC -> APCu


I have issue with PHP7 and APCu. After installation I got this error:

Fatal error: Call to undefined function Doctrine\Common\Cache\apc_fetch()

APCu is 100% enabled, I see it in the phpinfo(); And when I try apcu_fetch() it works.

How to use APCu in Symfony 2.8?


Solution

  • This answer is obsolet. The correct answer is the one from François Breton.

    In PHP 7 you have to add an additional module to your PHP setup: apc.so This is a module that enables backward compability to apc for apcu. This is kind of confusing...

    See http://php.net/manual/de/apcu.installation.php for more info.

    If you are using packages from https://deb.sury.org/ (ondrej ppa), you can install it via apt-get install php-apcu-bc.