Doctrine undefined function apc_fetch Doctrine undefined function apc_fetch codeigniter codeigniter

Doctrine undefined function apc_fetch


You need to enable the APC extension for PHP.

Follow this guide.

Alternatively, you could use a different caching driver, like memcache, and change the Doctrine config in accordance to that.

Check the doctrine documentation for alternate caching drivers. Perhaps the simplest solution would be to use ArrayCache in development.


Since php 5.5 apc is no longer used. You should install apcu.

E.g.

apt install php5.6-apcu

More info here:

http://php.net/manual/en/opcache.installation.php

And for those on php 7 there's a backwards compatibility module:

apt-get install php7.0-apcuapt-get install php7.0-apcu-bc

Also, you might need to add this repository:

apt-add-repository ppa:ondrej/phpapt-get update


If you don't install APC and just want to run it then in doctrine-cli.php at line 6, change mode:

define('ENVIRONMENT', 'production');

to

define('ENVIRONMENT', 'development');

Open Doctrine.php file, at line 36 ~ 43, you will see why!