mysqli and default socket

This commit is contained in:
Marc Delisle
2004-06-07 10:58:51 +00:00
parent 2b338f7676
commit acbee620e0
2 changed files with 10 additions and 1 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2004-06-07 Marc Delisle <lem9@users.sourceforge.net>
* 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ř <michal@cihar.com>
* lang/czech: Updated.

View File

@@ -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();