Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDujt-0007Z1-GD for pgsql-general@arkaria.postgresql.org; Wed, 11 Aug 2021 20:22:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mDujs-0006aV-Eb for pgsql-general@arkaria.postgresql.org; Wed, 11 Aug 2021 20:22:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDugh-0006kK-RJ for pgsql-general@lists.postgresql.org; Wed, 11 Aug 2021 20:18:56 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mDugb-0001dB-UI for pgsql-general@lists.postgresql.org; Wed, 11 Aug 2021 20:18:55 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 42E675C0036; Wed, 11 Aug 2021 16:18:48 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 11 Aug 2021 16:18:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=3 UK5ZaiWBQnlvz9quhPJBchPaI4nv5nNp9LURuNAzP8=; b=Wp0S5GdT/dkMaUmlA 0fIslFZdeTjhm4b343erGEcLvXmKhpRlPop8LOSD2tW0YqPyLl8xZuU28YpugicH R+AtFY/xsjNQpK2JDpLBQJVybhH9j23TYQcWv0YBpR8WkoD1ZHjirtaxrLcAlkW0 gnQMbnnQ69ShCIDjPAmxpiHZl0GyX+X+t6MNWIhT38a3xvC/OvyQNlEhVHZ+GALC rRmdAAm5ErL0/C1QUZq8i8YjhrmFlXpwrBjRC0uxfWon8vEeqFV9/FqQe2ywboUD dOh5c0bf94zKedZ0E55tMofRAXRE9n8WQ6pY9tpw14m4zmNEcAnGERNgM+XwSSEW 1TC/A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=3UK5ZaiWBQnlvz9quhPJBchPaI4nv5nNp9LURuNAz P8=; b=HopqsFY8wb6vjOGQEirSSlTAhvyH9MWFyQ+WsLnM1QRU83PuOpJW1hFVZ MbEwohLmqss6I8LNr1emMpzS+zf3eVImvthzIebCYMBgkrjxQKy8z/FISHAjtp+c CGbkk3KK5YO2ZOt5CjpdisU2axEFlN4vIW6YHtpFAoOqrB42Phfi/TL0lJ/xMA7Z oUsxqlecgibZ/6HDMKfM6wGAFur6BkXbreWS3dJ9RVoJvdYGbY7ATehMk3csC5ir oqBh5MSAhN54XREcLXb+Mxhr76JZRAICdh4Lp4UYMscALxvloPBbfAPW5kEAUyzJ TyZ+ylQcGdtvsvYrIWUupE5+hv8jA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrkedugddugeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepteejvdetff ejuedvleeifeefheeutdfhgfdvhffhhfekvdduveegvdejudefgfevnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvh gvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 11 Aug 2021 16:18:47 -0400 (EDT) Subject: Re: php connection failure To: ourdiaspora Cc: "pgsql-general@lists.postgresql.org" References: <79e859dc-9e70-cb72-85f8-e31786ad224d@aklaver.com> <5ae56ed6-ca48-b809-1e2d-85c36ca42f3e@aklaver.com> <15fdcfa5-dd32-a4bf-ee1f-3396393cc41f@aklaver.com> From: Adrian Klaver Message-ID: <539a1cdd-69bf-48ec-dd57-93d1592d6c3c@aklaver.com> Date: Wed, 11 Aug 2021 13:18:46 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 8/11/21 10:02 AM, ourdiaspora wrote: > > On Wednesday, August 11th, 2021 at 3:09 PM, Adrian Klaver wrote: > >> >> Is the Web server/PHP app on the same machine as the Postgres server? >> > > All programs about this question are installed on a single computer; the intention is to test and learn first on a local machine. > >> If it is on the same machine what happens if you do?: >> >> $dbconn = pg_connect("dbname=cpacweb user=cpaca") or die("Could not >> >> connect"); >> > > Am happy to report that connection looks successful, because the php web page now reports: > > " > Connection status ok > " That is just working around the problem, which is something is blocking the TCP port 5432 on localhost. Generally speaking, that should not be happening. You need to figure out what is doing this or you will probably be facing more issues down the road. From what you have shown it seems to be related to the Web application itself. I would try with pg_connect("dbname=cpacweb user=cpaca host=localhost") and look at the Web server logs. > > Thank you all very much for the help. Hope that other novices benefit too! :) > > > > -- Adrian Klaver adrian.klaver@aklaver.com