protected function actionSystemTest() { require GO::config()->root_path . 'install/gotest.php'; $this->render('externalHeader'); output_system_test(); $this->render('externalFooter'); }
<?php require 'header.php'; if ($_SERVER['REQUEST_METHOD'] == 'POST') { redirect("license.php"); } printHead(); ?> <h1>Thank you for installing <?php echo \GO::config()->product_name; ?> !</h1> <p>This page checks if your system meets the requirements to run <?php echo \GO::config()->product_name; ?> .</p> <p>If this page prints errors or warnings, please visit this page for more information: <a target="_blank" href="https://www.group-office.com/wiki/Installation">https://www.group-office.com/wiki/Installation</a></p> <h2>System test</h2> <?php require 'gotest.php'; if (!output_system_test()) { echo '<p style="color: red;">Because of a fatal error in your system setup the installation can\'t continue. Please fix the errors above first.</p>'; } else { echo continueButton(); } printFoot();
exec('whereis ' . $cmd, $return); if (isset($return[0])) { $locations = explode(' ', $return[0]); if (isset($locations[1])) { return $locations[1]; } } } return false; } function return_bytes($val) { $val = trim($val); $last = strtolower($val[strlen($val) - 1]); switch ($last) { // The 'G' modifier is available since PHP 5.1.0 case 'g': $val *= 1024; case 'm': $val *= 1024; case 'k': $val *= 1024; } return $val; } //check if we are included if (!class_exists('GO')) { echo '<h1 style="font-family: Arial, Helvetica;font-size: 18px;">' . $product_name . ' test script</h1><div style="font-family: Arial, Helvetica;font-size: 12px;"> '; output_system_test(); echo "</div>"; }