X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 074EDD1D84E for ; Thu, 12 Feb 2004 15:37:44 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 54579-10 for ; Thu, 12 Feb 2004 11:37:41 -0400 (AST) Received: from mail1.ihs.com (mail1.ihs.com [170.207.70.222]) by svr1.postgresql.org (Postfix) with ESMTP id 59052D1D27C for ; Thu, 12 Feb 2004 11:37:35 -0400 (AST) Received: from css120.ihs.com (css120.ihs.com [170.207.105.120]) by mail1.ihs.com (8.12.10/8.12.10) with ESMTP id i1CFaDc5014064; Thu, 12 Feb 2004 08:36:13 -0700 (MST) Date: Thu, 12 Feb 2004 08:30:17 -0700 (MST) From: "scott.marlowe" To: Michael Hanna Cc: Subject: Re: Can't connect to 7.4 DB In-Reply-To: <80431890-5D60-11D8-B81E-000A95B34330@sympatico.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IHS-MailScanner: Found to be clean X-IHS-MailScanner-SpamCheck: X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200402/26 X-Sequence-Number: 2574 OK, here's a little trick you may not be aware of. pg_connect("dbname=mydb user=stan"); will open a local unix domain socket. pg_connect("host=127.0.0.1 dbname=mydb user=stan"); will open a local TCP/IP connection on the loopback interface. In order for this to work, your postgresql.conf must have this line changed: #tcpip_socket = false to tcpip_socket = true and your pg_hba.conf needs a line like this: host all all 127.0.0.1 255.0.0.0 trust So it's likely the "secure by default" mentality of postgresql that's biting you here.