Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 26528D32488 for ; Mon, 30 Apr 2012 05:41:03 -0300 (ADT) Received: from zeus.netdynamics.gr ([94.229.71.8]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SOmAG-0008Q1-68 for pgsql-php@postgresql.org; Mon, 30 Apr 2012 08:41:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=telesuite.gr; s=default; h=Content-Type:MIME-Version:Message-ID:Date:Subject:In-Reply-To:References:To:From; bh=ss9EsL1eIllBNN0cTxUB+xlczoBUPtNtnmusCO/oLio=; b=U1xFjcNU4mBmz8Npapn2rk4v3rFYbKgtwY33m8wOUl4loeuUMmqw+hxqTDTrlHAA/ISYKGqczJdspypLidOzvVDJz3Voi7x7ugKmGrXiE0b7fYNTeUqkETqsqSg8MEQ8; Received: from sakeldim.static.otenet.gr ([83.235.183.180]:51070 helo=toshiba) by zeus.netdynamics.gr with esmtps (TLSv1:AES128-SHA:128) (Exim 4.77) (envelope-from ) id 1SOmA1-0006di-Gp; Mon, 30 Apr 2012 11:40:46 +0300 From: "Dimitris Sakellarios" To: "'Archana K N'" , References: In-Reply-To: Subject: Re: Cannot connect to remote postgres using php Date: Mon, 30 Apr 2012 11:40:37 +0300 Message-ID: <78A8EE7180F64BB9B80731343DC27C2D@toshiba> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0086_01CD26C6.10DD4890" X-Mailer: Microsoft Office Outlook 11 Thread-Index: Ac0mq4n9X8VjaUqhRfimQwUaX7kcpQAAEnyg X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18463 X-ACL-Warn: { X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - zeus.netdynamics.gr X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - telesuite.gr X-Source: X-Source-Args: X-Source-Dir: X-Pg-Spam-Score: 0.7 (/) X-Archive-Number: 201204/4 X-Sequence-Number: 4223 This is a multi-part message in MIME format. ------=_NextPart_000_0086_01CD26C6.10DD4890 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Dear Archana hi, Follow below: Step0 Make sure you have no firewall between you (php server root ip) and the server that blocks requests. If this is OK then: Step1 Inside postgresql.conf make sure you have set the listen IP and listen port of your server and this will be the port you connect with php pg_connect Step2 Inside pg_hda.conf configure the hosts you will allow connection either as trusted or md5 Typically bellow will allow all to connect hostnossl all all 0.0.0.0/0 trust Below will allow all to connect using username and password (but before have the first rule enabled to create remotely the users) hostnossl all all 0.0.0.0/0 md5 Step3 restart Pgsql server to grand the new setting. BR, Sakellarios Dimitris Telesuite ltd Telecommunication and Internet Services Address : T. Sofouli 14, Post Code 16344, Ilioupoli - Athens, Greece T.: +30 211 760 1300 F.: +30 211 176 9999 M.: +30 6982 550 850 e-mail: dimitris.sakellarios @telesuite.gr url: http://www.telesuite.gr _____ From: pgsql-php-owner@postgresql.org [mailto:pgsql-php-owner@postgresql.org] On Behalf Of Archana K N Sent: Monday, April 30, 2012 11:30 AM To: pgsql-php@postgresql.org Subject: [PHP] Cannot connect to remote postgres using php 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? " -- ------------------- regards archana -------------------- ------=_NextPart_000_0086_01CD26C6.10DD4890 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Dear Archana hi,

 

Follow below:

 

Step0

Make sure you have no firewall between you = (php server root ip) and the server that blocks = requests.

 

If this is OK = then:

 

Step1    =

Inside postgresql.conf make sure you have set = the listen IP and listen port of your server and this will be the port you = connect with php pg_connect

 

Step2

Inside pg_hda.conf configure the hosts you = will allow connection either as trusted or md5

 

Typically bellow will allow all to = connect

 

hostnossl    all         all         0.0.0.0/0          = trust

 

Below will allow all to connect using = username and password (but before have the first rule enabled to create remotely the = users)

 

hostnossl    all         all         0.0.0.0/0          = md5

 

Step3    restart Pgsql server = to grand the new setting.

 

BR,

 

 

Sakellarios = Dimitris

Telesuite= = ltd = Telecommunication and Internet = Services

Address : T. Sofouli 14, Post Code 16344, Ilioupoli = - Athens, Greece

T= .: +30 211 760 1300 F.: +30 211 176 9999 = M.: +30 6982 550 850 = e-mail: dimitris.sakellarios@telesuite.gr  = url: http://www.telesuite.gr


From: pgsql-php-owner@postgresql.org [mailto:pgsql-php-owner@postgresql.org] = On Behalf Of Archana K N
Sent: Monday, April 30, = 2012 11:30 AM
To: = pgsql-php@postgresql.org
Subject: [PHP] Cannot = connect to remote postgres using php

 


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?  "
--
-------------------
regards
archana
--------------------

------=_NextPart_000_0086_01CD26C6.10DD4890--