Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 1D4366322BD for ; Thu, 28 Jan 2010 09:47:00 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 27275-05 for ; Thu, 28 Jan 2010 13:46:49 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.potentialtech.com (internet.potentialtech.com [66.167.251.6]) by mail.postgresql.org (Postfix) with ESMTP id A02D363472B for ; Thu, 28 Jan 2010 09:46:49 -0400 (AST) Received: from localhost (pr40.pitbpa0.pub.collaborativefusion.com [206.210.89.202]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.potentialtech.com (Postfix) with ESMTPSA id 08B4EF7419; Thu, 28 Jan 2010 08:46:47 -0500 (EST) Date: Thu, 28 Jan 2010 08:46:47 -0500 From: Bill Moran To: Ireneusz.Tarnowski@pwr.wroc.pl Cc: Andrew McMillan , pgsql-php@postgresql.org Subject: Re: problem with connection to remote server Message-Id: <20100128084647.4c0ad114.wmoran@potentialtech.com> In-Reply-To: <73a0d649417f.4b61a0de@pwr.wroc.pl> References: <72b0d9d047b1.4b616c3d@pwr.wroc.pl> <1264672955.25189.256.camel@happy.home.mcmillan.net.nz> <20100128074300.59a4591d.wmoran@potentialtech.com> <73a0d649417f.4b61a0de@pwr.wroc.pl> Organization: Bill Moran X-Mailer: Sylpheed 2.7.1 (GTK+ 2.18.5; i386-portbld-freebsd7.2) Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201001/12 X-Sequence-Number: 4110 In response to Ireneusz Tarnowski : > > In addition to this, PHP will give some pretty useful error messages wh= en > > it can't connect.=A0 If you're not seeing those, then you should adjust > > your application logic to log them, it will make your life a lot easier. > > If they don't clearly define the problem, post them here ... I (and > > others like me) have seen them enough to know what they indicate. >=20 > I have warning: >=20 > Warning: pg_connect() [function.pg-connect]: Unable to connect to Postgre= SQL server: could not connect to server: No such file or directory Is the s= erver running on host "XX.XX.XX.XX" and accepting TCP/IP connections on por= t 5432? in /export/sun1000/XXXXXXX/public_html/dbtest.php on line 10 >=20 > And nothing more. Postgresql log, apache error log and php error log writ= e nothing about this connection. This is usually the result of a network problem. hba problems are usually reported as such by PHP. I would first 2x check the obvious ... did you mistype the IP or hostname in the connection string? Check firewall logs to ensure it's not being blocked by something. Run tcpdump on the server to see if it's getting the syn packets. --=20 Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/