1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
From 205a35302eb50cb6ef88f66187e6d9bbb52a501a Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Mon, 10 Feb 2020 11:37:39 +0100
Subject: [PATCH] Fix #6919 allow installation on UDS
---
inc/console/database/installcommand.class.php | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/inc/console/database/installcommand.class.php b/inc/console/database/installcommand.class.php
index 6f0b45961c..5d9387bf24 100644
--- a/inc/console/database/installcommand.class.php
+++ b/inc/console/database/installcommand.class.php
@@ -235,7 +235,11 @@ protected function execute(InputInterface $input, OutputInterface $output) {
}
$mysqli = new \mysqli();
- @$mysqli->connect($db_host, $db_user, $db_pass, null, $db_port);
+ if (intval($db_port) > 0) { // Network port
+ @$mysqli->connect($db_host, $db_user, $db_pass, null, $db_port);
+ } else { // Unix Domain Socket
+ @$mysqli->connect($db_host, $db_user, $db_pass, null, 0, $db_port);
+ }
if (0 !== $mysqli->connect_errno) {
$message = sprintf(
|