fix an issue with web installer looking for the mysqli extension when we only use pdo_mysql (#9958)

This commit is contained in:
Tony Murray
2019-03-14 13:10:45 -05:00
committed by GitHub
parent c7c7b57de4
commit 2fd7c4fab4
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ $init_modules = array('web', 'nodb');
require realpath(__DIR__ . '/..') . '/includes/init.php';
// List of php modules we expect to see
$modules = array('gd','mysqlnd');
$modules = array('gd','mysqlnd', 'pdo_mysql');
$dbhost = @$_POST['dbhost'] ?: 'localhost';
$dbuser = @$_POST['dbuser'] ?: 'librenms';

View File

@ -47,8 +47,8 @@ function dbConnect($db_host = null, $db_user = '', $db_pass = '', $db_name = '',
return Eloquent::DB();
}
if (!function_exists('mysqli_connect')) {
throw new DatabaseConnectException("mysqli extension not loaded!");
if (!extension_loaded('pdo_mysql')) {
throw new DatabaseConnectException("PHP pdo_mysql extension not loaded!");
}
try {