Php7 with Apcu - Call to Undefined Function Apc_Fetch()

UndefinedFunctionException - Attempted to call function apc_fetch from namespace Doctrine\Common\Cache

apc_fetch() is a function in the now deprecated apc module.
To use it with apcu on php7, use pecl to install the apcu_bc package.

http://pecl.php.net/package/apcu_bc

Additionally, add the line

extension=apc.so

to your php.ini (or your apcu.ini).
This will provide backward compatibility with the apc module.

Symfony / PHP7 APC - APCu

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.

Call to undefined function apc_clear_cache()

Ok the solution was to rename all the apc_* functions to apcu_* ... I guess the apcu_bc isn't working as it should.



Related Topics



Leave a reply



Submit