(if you installed PostfixAdmin as RPM or DEB package, you can obviously skip this step.)
(if you installed PostfixAdmin as RPM or DEB package, you can obviously skip this step.)
Assuming we are installing Postfixadmin into /srv/postfixadmin, then something like this should work.Please check https://github.com/postfixadmin/postfixadmin/releases to get the latest stable release first (the 3.2.4 version/url below is probably stale)
Assuming we are installing Postfixadmin into /srv/postfixadmin, then something like this should work :
print "<li>Database - MySQL (mysqli_ functions) - Found\n";
if (Config::read_string('database_type') != 'mysqli') {
print "<br>(change the database_type to 'mysqli' in config.local.php if you want to use MySQL)\n";
}
print "</li>";
} else {
} else {
print "<li>Database - MySQL (pdo_mysql) extension not found</li>";
print "<li>Database - MySQL (mysqli_ functions) - Not found</li>";
}
if (Config::read_string('database_type') == 'mysql') {
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
// PostgreSQL functions
//
//
if ($m_pdo_pgsql == 1) {
if ($f_pg_connect == 1) {
print "<li>Database : PDO PostgreSQL - Found \n";
print "<li>Database : PostgreSQL support (pg_ functions) - Found\n";
if (Config::read_string('database_type') != 'pgsql') {
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 "<br>(change the database_type to 'pgsql' in config.local.php if you want to use PostgreSQL)\n";
}
}
print "</li>";
print "</li>";
} else {
} else {
print "<li>Database - PostgreSQL (pdo_pgsql) extension not found</li>";
print "<li>Database - PostgreSQL (pg_ functions) - Not found</li>";
}
}
if ($m_pdo_sqlite == 1) {
if ($f_sqlite_open == 1) {
print "<li>Database : PDO SQLite - Found \n";
print "<li>Database : SQLite support (SQLite3) - Found \n";
if (Config::read_string('database_type') != 'sqlite') {
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 "<br>(change the database_type to 'sqlite' in config.local.php if you want to use SQLite)\n";
}
}
print "</li>";
print "</li>";
} else {
} else {
print "<li>Database - SQLite (pdo_sqlite) extension not found</li>";
print "<li>Database - SQLite (SQLite3) - Not found</li>";
if ($params[$i] != '' && $params[$i]{0} === '-') {
$key = substr($params[$i], 1);
$key = substr($params[$i], 1);
if (isset($params[$i+1])) {
# TODO: ideally we should know if a parameter can / must have a value instead of whitelisting known valid values starting with '-' (probably only bool doesn't need a value)
if ($params[$i+1]{0} === '-' && $params[$i+1] != '-1') {
$this->params[$key] = true;
$this->params[$key] = true;
unset($params[$i]);
if (isset($params[++$i])) {
# TODO: ideally we should know if a parameter can / must have a value instead of whitelisting known valid values starting with '-' (probably only bool doesn't need a value)
if ($params[$i]{0} !== '-' or $params[$i] != '-1') {