From 7ef3e3a60ca3bf0a7cad0cd00da9052ef5c95793 Mon Sep 17 00:00:00 2001 From: Michal Zuber Date: Wed, 22 Jun 2016 08:50:36 +0200 Subject: [PATCH] Check for Xcache from INI setting On a shared webhosting the Xcache module is loaded, but it can be disabled with .htaccess `php_flag xcache.cacher Off` which causes issues. --- lib/Doctrine/ORM/Tools/Setup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/ORM/Tools/Setup.php b/lib/Doctrine/ORM/Tools/Setup.php index 79d4670ad..d0cfe3f3b 100644 --- a/lib/Doctrine/ORM/Tools/Setup.php +++ b/lib/Doctrine/ORM/Tools/Setup.php @@ -126,7 +126,7 @@ class Setup if ($isDevMode === false && $cache === null) { if (extension_loaded('apc')) { $cache = new \Doctrine\Common\Cache\ApcCache(); - } elseif (extension_loaded('xcache')) { + } elseif (ini_get('xcache.cacher')) { $cache = new \Doctrine\Common\Cache\XcacheCache(); } elseif (extension_loaded('memcache')) { $memcache = new \Memcache();