} // We are forced to load APC cache, enabled or not if (!(include __ARMORYDIRECTORY__ . '/includes/classes/cache/cache.apc.php')) { die('<b>Error:</b> unable to load apc cache class!'); } if (Armory::$armoryconfig['useApc'] == true) { if (!(include __ARMORYDIRECTORY__ . '/includes/cache_config.php')) { die('<b>Error:</b> unable to load cache config!'); } // Make sure APC is installed if (!function_exists('apc_fetch')) { die('<b>Error:</b> APC is enabled in configuation, but is not installed on php'); } } Armory::$cache = new ApcCache(); Armory::$cacheconfig = $cacheConfig; /* Check DbVersion */ $dbVersion = Armory::$aDB->selectCell("SELECT `version` FROM `ARMORYDBPREFIX_db_version`"); if ($dbVersion != DB_VERSION) { if (!$dbVersion) { if (isset(Armory::$armoryconfig['checkVersionType']) && Armory::$armoryconfig['checkVersionType'] == 'log') { Armory::Log()->writeError('ArmoryChecker: wrong Armory DB name!'); } else { echo '<b>Fatal error</b>: wrong Armory DB name<br/>'; } } $errorDBVersion = sprintf('Current version is %s but expected %s.<br /> Apply all neccessary updates from \'sql/updates\' folder and refresh this page.', $dbVersion ? "'" . $dbVersion . "'" : 'not defined', "'" . DB_VERSION . "'"); if (isset(Armory::$armoryconfig['checkVersionType']) && Armory::$armoryconfig['checkVersionType'] == 'log') { Armory::Log()->writeError('ArmoryChecker : DB_VERSION error: %s', defined('DB_VERSION') ? $errorDBVersion : 'DB_VERSION constant not defined!'); } else {