Attempted to call function "apc_fetch" from namespace "Doctrine\Common\Cache"
Asked Answered
O

1

0

I've APC installed on my server, wondering if I'm missing something else. I want to be able to cache a 3rd party API request.

     code -
      $cache = new \Doctrine\Common\Cache\ApcCache();

      $data =  $cache->fetch('namesaved');

      if($data === false) { 
      $cache->save('namesaved','keyword');
      } 

      returns -     
     Attempted to call function "apc_fetch" from namespace 
     "Doctrine\Common\Cache" in      vendor/doctrine/cache/lib/Doctrine/Common/Cache/ApcCache.php line 40.
Ootid answered 8/10, 2015 at 13:25 Comment(0)
G
3

You are getting this error because the function apc_fetch could not be found. This means that either APC is not (correctly) installed, or that the module is not loaded in the PHP config.

Gainly answered 8/10, 2015 at 13:58 Comment(1)
my graceful restart didn't work, so restarted again and APC is working. thanksOotid

© 2022 - 2024 — McMap. All rights reserved.