* Copyright (c) 2022 LAYLO */ /* Check whether the configuration file exists - bail if that is the case */ if (file_exists(realpath("./config.inc.php"))) { print 'It seems that config.inc.php is already configured. Please delete setup.php to continue.'; die(); } /* Define the app specifics */ DEFINE('APP_NAME', 'OpenSMTPD Admin Setup Checker'); DEFINE('VERSION', '1.1'); /* Start generating the HTML output */ $html = ''; $html .= '
'; $html .= 'It seems that you are running this version of OpenSMTPD Admin for the first time.
'; $html .= 'PHP: | '; $html .= (version_compare(PHP_VERSION, '7.4.0') >= 0) ? 'At least 7.4 | ' : 'Unsupported version (=< 7.3) | '; $html .= '
SQL support: | '; $html .= (extension_loaded('mysqli')) ? 'MySQL/MariaDB' : ' | MySQL/MariaDB'; $html .= (extension_loaded('pgsql')) ? ' - PostgreSQL (change the database_type if you want to use PostgreSQL) | ' : ' - PostgreSQL'; $html .= '
Functions: | '; $html .= (extension_loaded('pcre')) ? 'pcre' : ' | pcre'; $html .= (function_exists('get_magic_quotes_gpc')) ? ' - get_magic_quotes_gpc' : ' - get_magic_quotes_gpc'; $html .= (function_exists('session_start')) ? ' - session_start | ' : ' - session_start'; $html .= '
Copy the
config.inc.php.sampleto
config.inc.phpand edit it to your environment and delete setup.php'; $html .= ''; $html .= ''; /* Print the output */ print $html; /* Thank you, goodbye */ die(); ?>