Fix to actually use domain sockets correctly.
authormr-russ <mr-russ>
Mon, 7 Feb 2005 22:15:34 +0000 (22:15 +0000)
committermr-russ <mr-russ>
Mon, 7 Feb 2005 22:15:34 +0000 (22:15 +0000)
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)

conf/config.inc.php-dist
libraries/adodb/drivers/adodb-postgres64.inc.php

index f2c39e26d145bf55b46faca98c52947c4f8379e6..66348fd030fed71b911cc3768e4bef067191d5e3 100644 (file)
@@ -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)
index d51cfdecb6992a6a5a8bb76227567ce2edb8c71d..0396fc7e3d27d7b116fe3f5f56ee343ff211a12e 100644 (file)
@@ -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) . "'";