// Copyright (c) 2022 High5!
// License Info: LICENSE.TXT
//
// File: index.php
//
// Template File: -none-
//
// Template Variables:
//
// -none-
//
// Form POST \ GET Variables:
//
// -none-
//
?>
OpenSMTPD Admin Setup Checker
OpenSMTPD Admin Setup Checker 1.0
Running software:
= 8) $phpversion = 8;
print "- PHP version " . phpversion() . "
\n";
} else {
print "Unable to check for PHP version. (missing function: phpversion())
\n";
}
print "\n";
print "Checking for dependencies:
\n";
print "\n";
//
// Check for config.inc.php
//
if ($file_config == 1) {
print "- Depends on: presence config.inc.php - OK
\n";
} else {
print "Error: Depends on: presence config.inc.php - NOT FOUND
\n";
print "Create the file.
";
print "For example:
\n";
print "% cp config.inc.php.sample config.inc.php
\n";
$error =+ 1;
}
print "\n";
//
// Check if there is support for at least 1 database
//
if (($f_mysql_connect == 0) and ($f_mysqli_connect == 0) and ($f_pg_connect == 0)) {
print "Error: There is no database support in your PHP setup
\n";
print "To install MariaDB 10 support on OpenBSD:
\n";
print "% pkg_add php-mysqli\n";
print "To install PostgreSQL support on OpenBSD:
\n";
print "% pkg_add php-pgsql\n";
$error =+ 1;
}
//
// MariaDB functions
//
if ($f_mysqli_connect == 1) {
print "- Depends on: MariaDB - OK
\n";
}
print "\n";
//
// PostgreSQL functions
//
if ($f_pg_connect == 1) {
print "- Depends on: PostgreSQL - OK (change the database_type in config.inc.php!!)
\n";
}
print "\n";
//
// Session functions
//
if ($f_session_start == 1) {
print "- Depends on: session - OK
\n";
} else {
print "Error: Depends on: session - NOT FOUND
\n";
print "To install session support on FreeBSD:
\n";
print "% cd /usr/ports/www/php$phpversion-session/\n";
print "% make clean install\n";
print " - or with portupgrade -\n";
print "% portinstall php$phpversion-session
\n";
$error =+ 1;
}
print "\n";
//
// PCRE functions
//
if ($f_preg_match == 1) {
print "- Depends on: pcre - OK
\n";
} else {
print "Error: Depends on: pcre - NOT FOUND
\n";
print "To install pcre support on FreeBSD:
\n";
print "% cd /usr/ports/devel/php$phpversion-pcre/\n";
print "% make clean install\n";
print " - or with portupgrade -\n";
print "% portinstall php$phpversion-pcre
\n";
$error =+ 1;
}
print "\n";
if ($error == 0) {
print "Everything seems fine... you are ready to rock & roll!\n";
print "Make sure you delete this setup.php file!
\n";
print "Also check the config.inc.php file for any settings that you might need to change!
\n";
print "Click here to go to the admin section (make sure that your .htaccess is setup properly)\n";
}
?>