EllisLab/CodeIgniter — Issue #576: Cache Class detects APC support if disabled in php.ini
Author: omega2k
Created: 2011-10-14 12:33:28+00:00
State: open

The problem of the is_supported() method in Cache_apc.php is, that it detects APC wrong!
If You set apc.enabled = 0 in php.ini, the extension_loaded('apc') will return TRUE, this is ok...
But function_exists('apc_store') will return TRUE as well, if the extension is loaded.

Better check by executing apc_cache_info like:

if ( ! extension_loaded('apc') OR ! function_exists('apc_cache_info') OR ! @apc_cache_info('user') )

This works well!

Greetings,

Patrick