findOne()) { return $this->redirect('/login'); } } public function handle() { $return = 1; $execEnabled = $this->isExecEnabled(); $hasOpenSsl = false; if ($execEnabled) { exec('command -v openssl', $output, $return); $hasOpenSsl = $return === 0; } $data = [ 'hasExecEnabled' => $execEnabled, 'hasOpenSsl' => $hasOpenSsl, 'hasOpenSslExtension' => extension_loaded('openssl'), 'hasZipExtension' => extension_loaded('zip'), 'hostname' => parse_url($_SERVER['HTTP_HOST'], PHP_URL_HOST), 'hostnameWithPort' => $_SERVER['HTTP_HOST'] ]; return $this->render('install.html.twig', $data); } private function isExecEnabled() { if (ini_get('safe_mode')) { return false; } else { $d = ini_get('disable_functions'); $s = ini_get('suhosin.executor.func.blacklist'); if ("$d$s") { $array = preg_split('/,\s*/', "$d,$s"); if (in_array('exec', $array)) { return false; } } } return true; } }