$lang = $appCacheViewEngine['LANG']; $status = strtoupper($appCacheViewEngine['STATUS']); } else { $confParams = array('LANG' => 'en', 'STATUS' => ''); $oConf->aConfig = $confParams; $oConf->saveConfig('APP_CACHE_VIEW_ENGINE', '', '', ''); $lang = 'en'; $status = ''; } //get user Root from hash $result->info = array(); $result->error = false; //setup the appcacheview object, and the path for the sql files $appCache = new AppCacheView(); $appCache->setPathToAppCacheFiles(PATH_METHODS . 'setup' . PATH_SEP . 'setupSchemas' . PATH_SEP); $res = $appCache->getMySQLVersion(); $result->info[] = array('name' => 'MySQL Version', 'value' => $res); $res = $appCache->checkGrantsForUser(false); $currentUser = $res['user']; $currentUserIsSuper = $res['super']; $result->info[] = array('name' => 'Current User', 'value' => $currentUser); $result->info[] = array('name' => 'Current User has SUPER privilege', 'value' => $currentUserIsSuper); try { PROPEL::Init(PATH_METHODS . 'dbConnections/rootDbConnections.php'); $con = Propel::getConnection("root"); } catch (Exception $e) { $result->info[] = array('name' => 'Checking MySql Root user', 'value' => 'failed'); $result->error = true; $result->errorMsg = $e->getMessage(); } //if user does not have the SUPER privilege we need to use the root user and grant the SUPER priv. to normal user.