diff --git a/src/Symfony/Component/Cache/Traits/ApcuTrait.php b/src/Symfony/Component/Cache/Traits/ApcuTrait.php index 5614b390cf2f4..5277ad2c6e78f 100644 --- a/src/Symfony/Component/Cache/Traits/ApcuTrait.php +++ b/src/Symfony/Component/Cache/Traits/ApcuTrait.php @@ -23,7 +23,7 @@ trait ApcuTrait { public static function isSupported() { - return function_exists('apcu_fetch') && ini_get('apc.enabled'); + return function_exists('apcu_fetch') && ini_get('cli' === PHP_SAPI ? 'apc.enable_cli' : 'apc.enabled'); } private function init($namespace, $defaultLifetime, $version)