From: mr-russ Date: Mon, 7 Feb 2005 22:15:34 +0000 (+0000) Subject: Fix to actually use domain sockets correctly. X-Git-Tag: REL_4-0-1~181 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=ce0e62b5485db64501d806ffdc45d97cfbfd800c;p=phppgadmin.git Fix to actually use domain sockets correctly. Previous fix used TCP/IP connections to localhost. Comments in the config file were also updated to make it clear to users that specifying localhost will use TCP/IP. (Thanks Nicola) --- diff --git a/conf/config.inc.php-dist b/conf/config.inc.php-dist index f2c39e26..66348fd0 100644 --- a/conf/config.inc.php-dist +++ b/conf/config.inc.php-dist @@ -4,7 +4,7 @@ * Central phpPgAdmin configuration. As a user you may modify the * settings here for your particular configuration. * - * $Id: config.inc.php-dist,v 1.37 2005/02/06 00:34:20 mr-russ Exp $ + * $Id: config.inc.php-dist,v 1.38 2005/02/07 22:15:34 mr-russ Exp $ */ // An example server. Create as many of these as you wish, @@ -14,6 +14,7 @@ $conf['servers'][0]['desc'] = 'PostgreSQL'; // Hostname or IP address for server. Use '' for UNIX domain socket. + // use 'localhost' for TCP/IP connection on this computer $conf['servers'][0]['host'] = ''; // Database port on server (5432 is the PostgreSQL default) diff --git a/libraries/adodb/drivers/adodb-postgres64.inc.php b/libraries/adodb/drivers/adodb-postgres64.inc.php index d51cfdec..0396fc7e 100644 --- a/libraries/adodb/drivers/adodb-postgres64.inc.php +++ b/libraries/adodb/drivers/adodb-postgres64.inc.php @@ -392,7 +392,7 @@ a different OID if a database must be reloaded. */ if ($str) { $host = split(":", $str); if ($host[0]) $str = "host='" . addslashes($host[0]) . "'"; - else $str = 'host=localhost'; + else $str = ''; if (isset($host[1])) $str .= " port='" . addslashes($host[1]) . "'"; } if ($user) $str .= " user='" . addslashes($user) . "'";