From 2fd7c4fab4fc11a549bb9032e85d33b22e478708 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Thu, 14 Mar 2019 13:10:45 -0500 Subject: [PATCH] fix an issue with web installer looking for the mysqli extension when we only use pdo_mysql (#9958) --- html/install.php | 2 +- includes/dbFacile.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/html/install.php b/html/install.php index f381c18c12..2580105f7b 100644 --- a/html/install.php +++ b/html/install.php @@ -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'; diff --git a/includes/dbFacile.php b/includes/dbFacile.php index 89ab5bbc48..1160187765 100644 --- a/includes/dbFacile.php +++ b/includes/dbFacile.php @@ -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 {