Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id D953BD32488 for ; Mon, 30 Apr 2012 06:03:03 -0300 (ADT) Received: from mail2.hosting.digiweb.ie ([89.234.64.43]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SOmVZ-0003eJ-GR for pgsql-php@postgresql.org; Mon, 30 Apr 2012 09:03:02 +0000 Received: (qmail 12866 invoked by uid 399); 30 Apr 2012 09:02:47 -0000 Received: from unknown (HELO ?127.0.0.1?) (music@galwaycathedral.ie@86.43.79.16) by mail2.hosting.digiweb.ie with ESMTPAM; 30 Apr 2012 09:02:47 -0000 X-Originating-IP: 86.43.79.16 Message-ID: <4F9E5536.7000805@iol.ie> Date: Mon, 30 Apr 2012 10:02:46 +0100 From: Raymond O'Donnell Reply-To: rod@iol.ie User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Archana K N CC: pgsql-php@postgresql.org Subject: Re: Cannot connect to remote postgres using php References: In-Reply-To: X-Enigmail-Version: 1.4.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 120429-1, 29/04/2012), Outbound message X-Antivirus-Status: Clean X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/6 X-Sequence-Number: 4225 On 30/04/2012 09:30, Archana K N wrote: > > Hello, > > I am getting this error whenever I try to connect to remote computer. > "Warning: pg_connect(): Unable to connect to PostgreSQL server: could > not connect to server: Connection timed out (0x0000274C/10060) Is the > server running on host "10.162.19.3" and accepting TCP/IP connections on > port 5432? " Things to check: - Is Postgres actually running on the server machine? - Is it accepting TCP/IP connections on port 5432? - Check listen_addresses in postgresql.conf - Is there a firewall somewhere between client and server? - Can you connect manually to the server using psql? Ray. -- Raymond O'Donnell :: Galway :: Ireland rod@iol.ie