summaryrefslogtreecommitdiff
path: root/framework/Caching
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Caching')
-rw-r--r--framework/Caching/TAPCCache.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/framework/Caching/TAPCCache.php b/framework/Caching/TAPCCache.php
index fb419911..969de4a4 100644
--- a/framework/Caching/TAPCCache.php
+++ b/framework/Caching/TAPCCache.php
@@ -54,9 +54,12 @@ class TAPCCache extends TCache
*/
public function init($config)
{
- if(!extension_loaded('apc'))
- throw new TConfigurationException('apccache_extension_required');
- parent::init($config);
+ if(substr(php_sapi_name(), 0, 3) !== 'cli') //APC is usually disabled in CLI mode.
+ {
+ if(!extension_loaded('apc'))
+ throw new TConfigurationException('apccache_extension_required');
+ parent::init($config);
+ }
}
/**