Symfony 2 apc caching error

3.2k views Asked by At

I am moving my Symfony 2 project to production environment on shared hosting. When I execute the file app.php I get error of

 Fatal error: Call to undefined function Doctrine\Common\Cache\apc_fetch() in /data/web/virtuals/53627/virtual/www/vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php on line 40

I contacted the hosting provider and was told that they no longer user APC caching, which seems to be outdated, so they moved further.

Is there any way how to omit APC caching using Symfony + Doctrine?

Thank you

1

There are 1 answers

4
kix On

Check out your app/config.yml: the Doctrine cache drivers are pretty configurable, and as the doc states, you could just set them to array. That would look pretty much like this:

doctrine:
    orm:
        auto_mapping: true
        metadata_cache_driver: array
        query_cache_driver: array
        result_cache_driver: array

Also note that this is basically the default configuration, so the defaults must've been overridden.