mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 16:08:55 +02:00
Use the persistent MySQL connections in install and build-base
Share mysql-connection from install to build-base
This commit is contained in:
+2
-1
@@ -28,6 +28,7 @@ if($stage == "4" || $stage == "3") {
|
||||
}
|
||||
|
||||
require '../includes/defaults.inc.php';
|
||||
$config['db']['extension']='mysqli';
|
||||
// Work out the install directory
|
||||
$cur_dir = explode('/',__DIR__);
|
||||
$check = end($cur_dir);
|
||||
@@ -47,7 +48,7 @@ require 'includes/functions.inc.php';
|
||||
|
||||
// Check we can connect to MySQL DB, if not, back to stage 1 :)
|
||||
if($stage == 2) {
|
||||
$test_db = mysqli_connect($dbhost,$dbuser,$dbpass,$dbname);
|
||||
$test_db = mysqli_connect('p:'.$dbhost,$dbuser,$dbpass,$dbname);
|
||||
if(mysqli_connect_error()) {
|
||||
$stage = 1;
|
||||
$msg = "Couldn't connect to the database, please check your details<br /> " . mysqli_connect_error();
|
||||
|
||||
Reference in New Issue
Block a user