From acbee620e09c37e6642c624d40d042ec4698fe73 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 7 Jun 2004 10:58:51 +0000 Subject: [PATCH] mysqli and default socket --- ChangeLog | 4 ++++ libraries/dbi/mysqli.dbi.lib.php | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8ecf62e1a..48e2227a8 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2004-06-07 Marc Delisle + * libraries/dbi/mysqli.dbi.lib.php: omit last parameter when calling + mysqli_connect() to enable the use of default socket + 2004-06-07 Michal Čihař * lang/czech: Updated. diff --git a/libraries/dbi/mysqli.dbi.lib.php b/libraries/dbi/mysqli.dbi.lib.php index 1e83e5a34..8ba49ea2e 100644 --- a/libraries/dbi/mysqli.dbi.lib.php +++ b/libraries/dbi/mysqli.dbi.lib.php @@ -43,7 +43,12 @@ function PMA_DBI_connect($user, $password) { ? FALSE : $cfg['Server']['socket']; - $link = @mysqli_connect($cfg['Server']['host'], $user, $password, FALSE, $server_port, $server_socket); + if ($server_socket) { + $link = @mysqli_connect($cfg['Server']['host'], $user, $password, FALSE, $server_port, $server_socket); + } else { + // Omit the last parameter to enable connection to the default socket + $link = @mysqli_connect($cfg['Server']['host'], $user, $password, FALSE, $server_port); + } if (empty($link)) { PMA_auth_fails();