diff --git a/config.inc.php b/config.inc.php index 051eb65c..491297e1 100644 --- a/config.inc.php +++ b/config.inc.php @@ -86,11 +86,17 @@ $CONF['database_host'] = 'localhost'; $CONF['database_user'] = 'postfix'; $CONF['database_password'] = 'postfixadmin'; $CONF['database_name'] = 'postfix'; + // If you need to specify a different port for a MYSQL database connection, use e.g. // $CONF['database_host'] = '172.30.33.66:3308'; -// If you need to specify a different port for POSTGRESQL database connection +// +// If you need to specify a different port for MySQLi(3306)/POSTGRESQL(5432) database connection // uncomment and change the following // $CONF['database_port'] = '5432'; +// +// If you wish to connect using a local socket file (e.g /var/run/mysql.sock) uncomment the below. +// $CONF['database_socket'] = '/var/run/mysql/mysqld.sock'; +// // If sqlite is used, specify the database file path: // $CONF['database_name'] = '/etc/postfix/sqlite/postfixadmin.db' diff --git a/functions.inc.php b/functions.inc.php index 67943f20..47fc63ef 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -1271,14 +1271,17 @@ function db_connect ($ignore_errors = false) { } } elseif ($CONF['database_type'] == "mysqli") { if (function_exists ("mysqli_connect")) { - $link = @mysqli_connect ($CONF['database_host'], $CONF['database_user'], $CONF['database_password']) or $error_text .= ("
DEBUG INFORMATION: