2015-10-08 30 views
0

我已將APC安裝在我的服務器上,想知道我是否缺少其他東西。我希望能夠緩存第三方API請求。試圖從命名空間「Doctrine Common Cache」調用函數「apc_fetch」

 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. 

回答

3

您收到此錯誤是因爲無法找到函數apc_fetch。這意味着APC沒有(正確)安裝,或者模塊未加載到PHP配置中。

+0

我的優雅重啓無法正常工作,因此重新啓動並且APC正在工作。謝謝 – GAV