Use the persistent MySQL connections in install and build-base

Share mysql-connection from install to build-base
This commit is contained in:
f0o
2015-09-02 15:28:54 +01:00
parent dca3b79a73
commit 87677eabeb
2 changed files with 7 additions and 3 deletions
+2 -1
View File
@@ -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();