-
-
-
-
- ×
-
-
-
- 'mysqli',
- 'php-curl' => 'curl',
- 'php-mbstring' => 'mbstring',
- 'php-gd' => 'gd',
- ];
-
- foreach ($extensions as $name => $ext) {
- $loaded = extension_loaded($ext);
- $phpExtensions[] = [
- 'name' => "$name installed",
- 'passed' => $loaded,
- 'value' => $loaded ? 'Installed' : 'Not Installed',
- ];
- }
-
- // Section: PHP Configuration
- $phpConfig = [];
-
- // Check if shell_exec is enabled
- $disabled_functions = explode(',', ini_get('disable_functions'));
- $disabled_functions = array_map('trim', $disabled_functions);
- $shell_exec_enabled = !in_array('shell_exec', $disabled_functions);
-
- $phpConfig[] = [
- 'name' => 'shell_exec is enabled',
- 'passed' => $shell_exec_enabled,
- 'value' => $shell_exec_enabled ? 'Enabled' : 'Disabled',
- ];
-
- // Check upload_max_filesize and post_max_size >= 500M
- function return_bytes($val) {
- $val = trim($val);
- $unit = strtolower(substr($val, -1));
- $num = (float)$val;
- switch ($unit) {
- case 'g':
- $num *= 1024;
- case 'm':
- $num *= 1024;
- case 'k':
- $num *= 1024;
- }
- return $num;
- }
-
- $required_bytes = 500 * 1024 * 1024; // 500M in bytes
-
- $upload_max_filesize = ini_get('upload_max_filesize');
- $post_max_size = ini_get('post_max_size');
-
- $upload_passed = return_bytes($upload_max_filesize) >= $required_bytes;
- $post_passed = return_bytes($post_max_size) >= $required_bytes;
-
- $phpConfig[] = [
- 'name' => 'upload_max_filesize >= 500M',
- 'passed' => $upload_passed,
- 'value' => $upload_max_filesize,
- ];
-
- $phpConfig[] = [
- 'name' => 'post_max_size >= 500M',
- 'passed' => $post_passed,
- 'value' => $post_max_size,
- ];
-
- // Check PHP version >= 8.2.0
- $php_version = PHP_VERSION;
- $php_passed = version_compare($php_version, '8.2.0', '>=');
-
- $phpConfig[] = [
- 'name' => 'PHP version >= 8.2.0',
- 'passed' => $php_passed,
- 'value' => $php_version,
- ];
-
- // Section: Shell Commands
- $shellCommands = [];
-
- if ($shell_exec_enabled) {
- $commands = ['git'];
-
- foreach ($commands as $command) {
- $which = trim(shell_exec("which $command 2>/dev/null"));
- $exists = !empty($which);
- $shellCommands[] = [
- 'name' => "Command '$command' available",
- 'passed' => $exists,
- 'value' => $exists ? $which : 'Not Found',
- ];
- }
- } else {
- // If shell_exec is disabled, mark commands as unavailable
- foreach (['git'] as $command) {
- $shellCommands[] = [
- 'name' => "Command '$command' available",
- 'passed' => false,
- 'value' => 'shell_exec Disabled',
- ];
- }
- }
-
- // Section: SSL Checks
- $sslChecks = [];
-
- // Check if accessing via HTTPS
- $https = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443;
- $sslChecks[] = [
- 'name' => 'Accessing via HTTPS',
- 'passed' => $https,
- 'value' => $https ? 'Yes' : 'No',
- ];
-
- // SSL Certificate Validity Check
- if ($https) {
- $streamContext = stream_context_create(["ssl" => ["capture_peer_cert" => true]]);
- $socket = @stream_socket_client("ssl://{$_SERVER['HTTP_HOST']}:443", $errno, $errstr, 30, STREAM_CLIENT_CONNECT, $streamContext);
-
- if ($socket) {
- $params = stream_context_get_params($socket);
- $cert = $params['options']['ssl']['peer_certificate'];
- $certInfo = openssl_x509_parse($cert);
-
- $validFrom = $certInfo['validFrom_time_t'];
- $validTo = $certInfo['validTo_time_t'];
- $currentTime = time();
-
- $certValid = ($currentTime >= $validFrom && $currentTime <= $validTo);
-
- $sslChecks[] = [
- 'name' => 'SSL Certificate is valid',
- 'passed' => $certValid,
- 'value' => $certValid ? 'Valid' : 'Invalid or Expired',
- ];
- } else {
- $sslChecks[] = [
- 'name' => 'SSL Certificate is valid',
- 'passed' => false,
- 'value' => 'Unable to retrieve certificate',
- ];
- }
- } else {
- $sslChecks[] = [
- 'name' => 'SSL Certificate is valid',
- 'passed' => false,
- 'value' => 'Not using HTTPS',
- ];
- }
-
- // Section: Domain Checks
- $domainChecks = [];
-
- // Check if the site has a valid FQDN
- $fqdn = $_SERVER['HTTP_HOST'];
- $isValidFqdn = (bool) filter_var('http://' . $fqdn, FILTER_VALIDATE_URL) && preg_match('/^[a-z0-9.-]+\.[a-z]{2,}$/i', $fqdn);
-
- $domainChecks[] = [
- 'name' => 'Site has a valid FQDN',
- 'passed' => $isValidFqdn,
- 'value' => $fqdn,
- ];
-
- // Section: File Permissions
- $filePermissions = [];
-
- // Check if web user has write access to webroot directory
- $webroot = $_SERVER['DOCUMENT_ROOT'];
- $writable = is_writable($webroot);
- $filePermissions[] = [
- 'name' => 'Web user has write access to webroot directory',
- 'passed' => $writable,
- 'value' => $webroot,
- ];
- ?>
-
-
-
-
-
-
-
-
- PHP Extensions
-
-
-
- = htmlspecialchars($check['name']); ?>
-
-
-
-
-
-
-
- = htmlspecialchars($check['value']); ?>
-
-
-
-
-
- PHP Configuration
-
-
-
- = htmlspecialchars($check['name']); ?>
-
-
-
-
-
-
-
- = htmlspecialchars($check['value']); ?>
-
-
-
-
-
- Shell Commands
-
-
-
- = htmlspecialchars($check['name']); ?>
-
-
-
-
-
-
-
- = htmlspecialchars($check['value']); ?>
-
-
-
-
-
- SSL Checks
-
-
-
- = htmlspecialchars($check['name']); ?>
-
-
-
-
-
-
-
- = htmlspecialchars($check['value']); ?>
-
-
-
-
-
- Domain Checks
-
-
-
- = htmlspecialchars($check['name']); ?>
-
-
-
-
-
-
-
- = htmlspecialchars($check['value']); ?>
-
-
-
-
-
- File Permissions
-
-
-
- = htmlspecialchars($check['name']); ?>
-
-
-
-
-
-
-
- = htmlspecialchars($check['value']); ?>
-
-
-
-
-
-
-
-
Next (Database)
-
-
-
-
-
-
-
-
-
- Database is already configured. Any further changes should be made by editing the config.php file,
- or deleting it and refreshing this page.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Thank you for choosing to try TaskFlow!
-
This is the start of your journey towards amazing task management
-
A database must be created before proceeding - click on the button below to get started.
-
-
TaskFlow is free software : you can redistribute and/or modify it under the terms of the GNU General Public License . It is distributed in the hope that it will be useful, but without any warranty ; without even the implied warranty of merchantability or fitness for a particular purpose.
-
-
-
-
-
-
-
-