$requirement) {
$image = Registry::load('config')->site_url.'assets/files/defaults/installer_warning.png';
$output = 'Disabled';
$result = false;
$show_status = true;
if (isset($requirement['required']) && $requirement['required']) {
$image = Registry::load('config')->site_url.'assets/files/defaults/installer_error.png';
}
if (!isset($requirement['description'])) {
$requirement['description'] = '';
}
if ($index === 'php_version') {
$output = PHP_VERSION;
if (version_compare(PHP_VERSION, '8.0') >= 0) {
$result = true;
}
} elseif ($index === 'server_software') {
$output = $_SERVER["SERVER_SOFTWARE"];
if (strpos(strtolower($_SERVER["SERVER_SOFTWARE"]), "nginx") !== false) {
$output .= '
You are using Grupo with Nginx Server, you will need to setup Nginx specific rewrite rules.';
}
if (strpos(strtolower($_SERVER["SERVER_SOFTWARE"]), "apache") !== false || strpos(strtolower($_SERVER["SERVER_SOFTWARE"]), "litespeed") !== false || strpos(strtolower($_SERVER["SERVER_SOFTWARE"]), "nginx") !== false) {
$result = true;
}
} elseif ($index === 'write_permission') {
if (is_writable('assets') && is_writable('pages')) {
$result = true;
$output = 'Writable';
} else {
$output = 'You do not have permissions to create a directory or to write files. ';
$output .= 'Kindly check File Ownership & File Permissions.';
}
} elseif ($index === 'mod_rewrite') {
if (in_array('mod_rewrite', apache_get_modules())) {
$result = true;
$output = 'Enabled';
}
} elseif ($index === 'output_buffering') {
if (ini_get('output_buffering')) {
$result = true;
$output = 'Enabled';
}
} elseif ($index === 'allow_url_fopen') {
if (ini_get('allow_url_fopen')) {
$result = true;
$output = 'Enabled';
}
} elseif ($index === 'imagick') {
if (extension_loaded('imagick') || class_exists("Imagick")) {
$result = true;
$output = 'Enabled';
}
} elseif ($index === 'ffmpeg') {
$output = 'Unrecognizable';
$show_status = false;
if (isEnabled('shell_exec')) {
$ffmpeg = shell_exec('ffmpeg -version');
if (strpos($ffmpeg, 'ffmpeg version') !== false) {
$result = true;
$output = 'Enabled';
$show_status = true;
}
}
} elseif (extension_loaded($index)) {
$output = 'Enabled';
$result = true;
}
if ($result) {
$image = Registry::load('config')->site_url.'assets/files/defaults/installer_tick.png';
} else {
if (isset($requirement['required']) && $requirement['required']) {
$proceed = false;
}
}
if ($show_status) {
?>
NOTE : Does not meet minimum requirements for installing the Application.