private static function checkPrereqs() { try { checkConfigFileExists(); checkMysqliPermissions(); checkRewrite(); } catch (PrerequisiteCheckFailedException $e) { println("The prerequisite check failed."); println($e->getMessage()); } }
$values[] = array('desc' => 'PHP version < 7.0.0', 'res' => version_compare(PHP_VERSION, '7.0.0') < 0); $values[] = array('desc' => 'Default Time Zone set', 'res' => !empty(ini_get('date.timezone'))); $values[] = array('desc' => 'mcrypt module installed', 'res' => extension_loaded('mcrypt')); $values[] = array('desc' => 'simplexml module installed', 'res' => extension_loaded('simplexml')); $values[] = array('desc' => 'zlib module installed', 'res' => extension_loaded('zlib')); $values[] = array('desc' => 'json module installed', 'res' => extension_loaded('json')); //$values[] = array('desc' => 'mhash module installed', 'res' => extension_loaded('mhash')); $values[] = array('desc' => 'xmlwriter module installed', 'res' => extension_loaded('xmlwriter')); $values[] = array('desc' => 'mbstring module installed', 'res' => extension_loaded('mbstring')); $values[] = array('desc' => 'pdo module installed', 'res' => extension_loaded('pdo')); $values[] = array('desc' => 'pdo_mysql installed', '', 'res' => extension_loaded('pdo_mysql')); $values[] = array('desc' => 'gettext installed', 'res' => function_exists('gettext')); $values[] = array('desc' => 'shell_exec function enabled', 'res' => isAvailable('shell_exec')); $values[] = array('desc' => 'curl function enabled', 'res' => function_exists('curl_version')); $values[] = array('desc' => 'Magic Quotes disabled', 'res' => !get_magic_quotes_gpc()); $values[] = array('desc' => 'Apache MOD Rewrite enabled', 'res' => checkRewrite()); // ============= // = FUNCTIONS = // ============= function checkRewrite() { foreach ($_SERVER as $k => $v) { if ($k == 'XXX_REWRITE_XXX') { return true; } if ($k == 'REDIRECT_XXX_REWRITE_XXX') { return true; } } return false; }