From cd02fd964daafc7093fe1f052ee0f0d6aed51108 Mon Sep 17 00:00:00 2001 From: luciano-jr Date: Wed, 26 Nov 2014 17:19:15 -0200 Subject: [PATCH] added verification if apc is enabled --- cli-config.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cli-config.php b/cli-config.php index 9ee19e4..730df4b 100644 --- a/cli-config.php +++ b/cli-config.php @@ -35,9 +35,12 @@ ); $config->setMetadataDriverImpl($driverImpl); -$cache = new \Doctrine\Common\Cache\ApcCache(); +if(extension_loaded('apc') && ini_get('apc.enabled')) +{ + $cache = new \Doctrine\Common\Cache\ApcCache(); -$config->setMetadataCacheImpl($cache); + $config->setMetadataCacheImpl($cache); +} $connectionOptions = $configValues['db.options'];