print "<li><b>Recommended PHP version: >= 5.2.3, you have " . phpversion() . "</b></li>\n";
print "<li><b>Recommended PHP version: >= 7.0, you have " . phpversion() . "; you should upgrade.</b></li>\n";
} else {
$phpversion = 5;
print "<li>PHP version " . phpversion() . "</li>\n";
print "<li>PHP version " . phpversion() . " - Good</li>\n";
}
# TODO: check for PHP >= 5.2.3 - smarty uses htmlentities with 4 parameters. The forth parameter was added in PHP 5.2.3, older versions will give a warning
} else {
print "<li><b>Unable to check for PHP version. (missing function: phpversion())</b></li>\n";
print "<li><bstyle='color: red'>DANGER</b> Unable to check for PHP version. (missing function: phpversion())</b></li>\n";
$error++;
}
//
@ -93,7 +90,7 @@ if ($f_apache_get_version == 1) {
}
print "</ul>";
print "<p>Checking for dependencies:\n";
print "<p>Checking environment:\n";
print "<ul>\n";
//
@ -103,42 +100,16 @@ if ($f_get_magic_quotes_gpc == 1) {
if (get_magic_quotes_gpc() == 0) {
print "<li>Magic Quotes: Disabled - OK</li>\n";
} else {
print "<li><b>Warning: Magic Quotes: ON (internal workaround used)</b></li>\n";
print "<li><b>Warning: Magic Quotes: ON (internal work around to disable is in place)</b></li>\n";
}
} else {
print "<li><b>Unable to check for Magic Quotes. (missing function: get_magic_quotes_gpc())</b></li>\n";
}
//
// Check for config.inc.php
//
$config_loaded = 0;
if ($file_config == 1) {
print "<li>Depends on: presence config.inc.php - OK</li>\n";
print "<li><strong><spanstyle='color: red'>Warning:</span> your configured database_type 'mysql' is deprecated; you must move to use 'mysqli'</strong> in your config.local.php.</li>\n";
$error++;
}
//
// PostgreSQL functions
//
if ($f_pg_connect == 1) {
print "<li>Depends on: PostgreSQL - OK \n";
if (!($config_loaded && $CONF['database_type'] == 'pgsql')) {
print "<li>Database : PostgreSQL support (pg_ functions) - Found\n";
if (Config::read_string('database_type') != 'pgsql') {
print "<br>(change the database_type to 'pgsql' in config.local.php if you want to use PostgreSQL)\n";
}
print "</li>";
}
else {
print "<li>Database - PostgreSQL (pg_ functions) - Not found</li>";
}
if ($f_sqlite_open == 1) {
print "<li>Depends on: SQLite - OK \n";
if (!($config_loaded && db_sqlite())) {
print "<li>Database : SQLite support (SQLite3) - Found \n";
if (Config::read_string('database_type') != 'sqlite') {
print "<br>(change the database_type to 'sqlite' in config.local.php if you want to use SQLite)\n";
}
print "</li>";
}
else {
print "<li>Database - SQLite (SQLite3) - Not found</li>";
print "Without IMAP support, you won't be able to create subfolders when creating mailboxes.</li>\n";
}
@ -282,12 +255,11 @@ if ($f_imap_open == 1) {
// If PHP <7.0,requirerandom_compatworks.CurrentlywebundleitviathePharextension.
//
if (version_compare($phpversion, "7.0", '<')
if (version_compare(phpversion(), "7.0", '<')
&& !extension_loaded('Phar')
&& $config_loaded
&& $CONF['configured']
&& $CONF['encrypt'] == 'php_crypt') {
print "<li>Requires 'Phar' extension support for <strong>secure</strong> random_int() function fallback";
print "<li>PHP before 7.0 requires 'Phar' extension support for <strong>secure</strong> random_int() function fallback";
print "<br/>Either enable the 'Phar' extension, or install the random_compat library files from <ahref='https://github.com/paragonie/random_compat'>https://github.com/paragonie/random_compat</a> and include/require them from functions.inc.php";
print "<br/>PostfixAdmin has bundled lib/random_compat.phar but it's not usable on your installation due to the missing Phar extension.</li>";
$error += 1;
@ -430,8 +402,8 @@ if ($error != 0) {
<?php
} ?>
<b>Since version 2.3 there is no requirement to delete setup.php!</b><br/>
<b>Check the config.inc.php file for any other settings that you might need to change!<br/>
<p>Since version 2.3 there is no requirement to delete setup.php</p>
<p>Check the config.inc.php file for any other settings that you may need to change.</p>