name; $version = Factory::getDatabase()->getVersion(); AliceUtilLogger::WriteLog(_AE_LOG_INFO, $this->checkName.' Detected database connector: '.$connector); AliceUtilLogger::WriteLog(_AE_LOG_INFO, $this->checkName.' Detected database version: '.$version); if($connector == 'mysql' || $connector == 'mysqli') { if(version_compare($version, '5.0.47', 'lt')) { $this->setResult(-1); throw new Exception(Text::sprintf('ALICE_ANALYZE_REQUIREMENTS_DATABASE_VERSION_TOO_OLD', $version)); } } elseif($connector == 'oracle') { $this->setResult(-1); throw new Exception(Text::sprintf('ALICE_ANALYZE_REQUIREMENTS_DATABASE_UNSUPPORTED', 'SqlAzure')); } elseif($connector == 'pdo') { $this->setResult(-1); throw new Exception(Text::sprintf('ALICE_ANALYZE_REQUIREMENTS_DATABASE_UNSUPPORTED', 'PDO')); } elseif($connector == 'postgresql') { if(version_compare($version, '8.3.18', 'lt')) { $this->setResult(-1); throw new Exception(Text::sprintf('ALICE_ANALYZE_REQUIREMENTS_DATABASE_VERSION_TOO_OLD', $version)); } } elseif($connector == 'sqlsrv' || $connector == 'sqlzure') { if(version_compare($version, '10.50.1600.1', 'lt')) { $this->setResult(-1); throw new Exception(Text::sprintf('ALICE_ANALYZE_REQUIREMENTS_DATABASE_VERSION_TOO_OLD', $version)); } } elseif($connector == 'sqlite') { $this->setResult(-1); throw new Exception(Text::sprintf('ALICE_ANALYZE_REQUIREMENTS_DATABASE_UNSUPPORTED', 'SQLite')); } else { // Unknown database type, throw exception $this->setResult(-1); throw new Exception(Text::sprintf('ALICE_ANALYZE_REQUIREMENTS_DATABASE_UNKNOWN')); } return true; } public function getSolution() { return Text::_('ALICE_ANALYZE_REQUIREMENTS_DATABASE_SOLUTION'); } }