public static function Checks() { $xtpl = self::$xtpl; $checks = Checks::getInstance(); try { foreach ($checks->GetChecks() as $k => $v) { switch ($k) { case 'PHP': $xtpl->assign(strtoupper($v) . 'MSG', 'PHP minimum version ' . MIN_PHP_VERSION); break; case 'MYSQL': $xtpl->assign(strtoupper($v) . 'MSG', 'MySQL supported by your PHP installation'); break; case 'CONFIG': $xtpl->assign(strtoupper($v) . 'MSG', 'Configuration file on its place and writeable'); break; } $xtpl->parse('main.checks.' . $v); } } catch (Exception $e) { die("Fatal error: " . $e->getMessage()); } $xtpl->parse('main.checks'); $xtpl->parse('main'); $xtpl->out('main'); }
public static function getInstance() { if (self::$c_instance == NULL) { self::$c_instance = new self(); } return self::$c_instance; }
private static function doCheck() { return array("constants" => Checks::constants(), "multithread" => Checks::multithread(), "signals" => Checks::signals(), "database" => Checks::database(), "real_path" => EXTENDER_REAL_PATH, "multithread_enabled" => EXTENDER_MULTITHREAD_ENABLED, "idle_time" => EXTENDER_IDLE_TIME, "max_result_bytes" => EXTENDER_MAX_RESULT_BYTES, "max_childs" => EXTENDER_MAX_CHILDS, "max_childs_runtime" => EXTENDER_MAX_CHILDS_RUNTIME, "parent_niceness" => defined('EXTENDER_PARENT_NICENESS') ? EXTENDER_PARENT_NICENESS : null, "child_niceness" => defined('EXTENDER_CHILD_NICENESS') ? EXTENDER_CHILD_NICENESS : null); }
/** * Step #2: Pre-Installation Check * @param $request */ public function executeStep2(sfWebRequest $request) { if ($request->isMethod('post')) { // if there is a blocking error return to the same page if ($this->getRequestParameter('error')) { return sfView::SUCCESS; } $this->getUser()->setAttribute('step', 3); $this->redirect($this->next); } $this->checks_required = Checks::getRequired(); $this->checks_recommended = Checks::getRecommended(); $this->checks_fileperms = Checks::getFilePerms(); }