Lists: | pgsql-php |
---|
From: | Archana K N <archanakknn(at)gmail(dot)com> |
---|---|
To: | pgsql-php(at)postgresql(dot)org |
Subject: | Cannot connect to remote postgres using php |
Date: | 2012-04-30 08:30:22 |
Message-ID: | CACa6=i3GUa7gi0S1p6XiJ0FfBpkEKfoKn2ziCdQAzQLgyGmhpw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-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
--------------------
From: | Narongdetch Jongjit <narongdetch(at)hotmail(dot)com> |
---|---|
To: | <archanakknn(at)gmail(dot)com>, <pgsql-php(at)postgresql(dot)org> |
Subject: | Re: Cannot connect to remote postgres using php |
Date: | 2012-04-30 08:33:04 |
Message-ID: | COL110-W1060E904A5CF41218442B0AA280@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-php |
Dear Archana,
Sorry! Why did you ask me?
Best Regards,
Narongdetch Jongjit
Date: Mon, 30 Apr 2012 14:00:22 +0530
Subject: [PHP] Cannot connect to remote postgres using php
From: archanakknn(at)gmail(dot)com
To: pgsql-php(at)postgresql(dot)org
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
--------------------
From: | Hartmut Holzgraefe <hartmut(dot)holzgraefe(at)gmail(dot)com> |
---|---|
To: | pgsql-php(at)postgresql(dot)org |
Subject: | Re: Cannot connect to remote postgres using php |
Date: | 2012-04-30 08:33:33 |
Message-ID: | 4F9E4E5D.1020500@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-php |
On 04/30/2012 10:30 AM, 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? "
there's most likely a firewall in between that drops packages ...
--
hartmut
From: | "Dimitris Sakellarios" <dimitris(dot)sakellarios(at)telesuite(dot)gr> |
---|---|
To: | "'Archana K N'" <archanakknn(at)gmail(dot)com>, <pgsql-php(at)postgresql(dot)org> |
Subject: | Re: Cannot connect to remote postgres using php |
Date: | 2012-04-30 08:40:37 |
Message-ID: | 78A8EE7180F64BB9B80731343DC27C2D@toshiba |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-php |
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 <mailto:dimitris(dot)sakellarios(at)telesuite(dot)gr>
@telesuite.gr url: http://www.telesuite.gr <http://www.telesuite.gr/>
_____
From: pgsql-php-owner(at)postgresql(dot)org [mailto:pgsql-php-owner(at)postgresql(dot)org]
On Behalf Of Archana K N
Sent: Monday, April 30, 2012 11:30 AM
To: pgsql-php(at)postgresql(dot)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
--------------------
From: | Sven Marcel Buchholz <sven(at)is-buchholz(dot)com> |
---|---|
To: | pgsql-php(at)postgresql(dot)org |
Subject: | Re: Cannot connect to remote postgres using php |
Date: | 2012-04-30 08:43:53 |
Message-ID: | 4F9E50C9.7010708@is-buchholz.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-php |
On 30.04.12 10: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? "
> --
> -------------------
> regards
> archana
> --------------------
Hello,
did your DB-Server accept connections via TCP/IP, can you connect via psql?
regards
Sven
From: | Raymond O'Donnell <rod(at)iol(dot)ie> |
---|---|
To: | Archana K N <archanakknn(at)gmail(dot)com> |
Cc: | pgsql-php(at)postgresql(dot)org |
Subject: | Re: Cannot connect to remote postgres using php |
Date: | 2012-04-30 09:02:46 |
Message-ID: | 4F9E5536.7000805@iol.ie |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-php |
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(at)iol(dot)ie
From: | Archana K N <archanakknn(at)gmail(dot)com> |
---|---|
To: | pgsql-php(at)postgresql(dot)org |
Subject: | Re: Cannot connect to remote postgres using php |
Date: | 2012-04-30 10:01:59 |
Message-ID: | CACa6=i1bgxgUv7TwRvJ-OfZpkd9ABTVCwM0Ek4GvphPFuHROdA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-php |
Hello,
I can connect to the other computer using web browser and also can access
postgres.
--
-------------------
regards
archana
--------------------
From: | Raymond O'Donnell <rod(at)iol(dot)ie> |
---|---|
To: | Archana K N <archanakknn(at)gmail(dot)com> |
Cc: | pgsql-php(at)postgresql(dot)org |
Subject: | Re: Cannot connect to remote postgres using php |
Date: | 2012-04-30 10:07:36 |
Message-ID: | 4F9E6468.8050805@iol.ie |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-php |
On 30/04/2012 11:01, Archana K N wrote:
>
> Hello,
>
> I can connect to the other computer using web browser and also can
> access postgres.
How exactly are you access Postgres? - psql, pgAdmin, or some other means?
Also, a *lot* more detail would help.... operating systems, Postgres
version, PHP version, whether you're connection on a LAN or over the
Internet, etc etc etc.
Ray.
--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie
From: | "Dimitris Sakellarios" <dimitris(dot)sakellarios(at)telesuite(dot)gr> |
---|---|
To: | "'Archana K N'" <archanakknn(at)gmail(dot)com>, <pgsql-php(at)postgresql(dot)org> |
Subject: | Re: Cannot connect to remote postgres using php |
Date: | 2012-04-30 10:10:38 |
Message-ID: | E94ED90402C8435C8006ED4AC91ABE99@toshiba |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-php |
Dear archana,
Is the PHP script you are running on a remote server other than the one
running Pgsql?
If so, have you got rights to access Pgsql server remotely? Or you are
allowed only from a web browser using phpmyadmin?
Are you the admin of Pgsql server?
---------
Did you try pgAdmin3 as a standalone client to connect from your pc?
Please provide some topology design.
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 <mailto:dimitris(dot)sakellarios(at)telesuite(dot)gr>
@telesuite.gr url: http://www.telesuite.gr <http://www.telesuite.gr/>
_____
From: pgsql-php-owner(at)postgresql(dot)org [mailto:pgsql-php-owner(at)postgresql(dot)org]
On Behalf Of Archana K N
Sent: Monday, April 30, 2012 1:02 PM
To: pgsql-php(at)postgresql(dot)org
Subject: Re: [PHP] Cannot connect to remote postgres using php
Hello,
I can connect to the other computer using web browser and also can access
postgres.
--
-------------------
regards
archana
--------------------
From: | "Dimitris Sakellarios" <dimitris(dot)sakellarios(at)telesuite(dot)gr> |
---|---|
To: | "'Archana K N'" <archanakknn(at)gmail(dot)com>, <pgsql-php(at)postgresql(dot)org> |
Subject: | Re: Cannot connect to remote postgres using php |
Date: | 2012-04-30 10:16:06 |
Message-ID: | PostgreSQL : Re : 무지개 토토를 사용하여 원격 포스트 그레에 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-php |
If you are admin of Pgsql server pls provide
pg_hda.conf
postgresql.conf
maybe the configuration of your server doesn't allow connection other that
local host.
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 <mailto:dimitris(dot)sakellarios(at)telesuite(dot)gr>
@telesuite.gr url: http://www.telesuite.gr <http://www.telesuite.gr/>
_____
From: pgsql-php-owner(at)postgresql(dot)org [mailto:pgsql-php-owner(at)postgresql(dot)org]
On Behalf Of Dimitris Sakellarios
Sent: Monday, April 30, 2012 1:11 PM
To: 'Archana K N'; pgsql-php(at)postgresql(dot)org
Subject: Re: [PHP] Cannot connect to remote postgres using php
Dear archana,
Is the PHP script you are running on a remote server other than the one
running Pgsql?
If so, have you got rights to access Pgsql server remotely? Or you are
allowed only from a web browser using phpmyadmin?
Are you the admin of Pgsql server?
---------
Did you try pgAdmin3 as a standalone client to connect from your pc?
Please provide some topology design.
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 <mailto:dimitris(dot)sakellarios(at)telesuite(dot)gr>
@telesuite.gr url: http://www.telesuite.gr <http://www.telesuite.gr/>
_____
From: pgsql-php-owner(at)postgresql(dot)org [mailto:pgsql-php-owner(at)postgresql(dot)org]
On Behalf Of Archana K N
Sent: Monday, April 30, 2012 1:02 PM
To: pgsql-php(at)postgresql(dot)org
Subject: Re: [PHP] Cannot connect to remote postgres using php
Hello,
I can connect to the other computer using web browser and also can access
postgres.
--
-------------------
regards
archana
--------------------
From: | Raymond O'Donnell <rod(at)iol(dot)ie> |
---|---|
To: | Archana K N <archanakknn(at)gmail(dot)com>, PostgreSQLPHP <pgsql-php(at)postgresql(dot)org> |
Subject: | Re: Cannot connect to remote postgres using php |
Date: | 2012-04-30 10:26:03 |
Message-ID: | 4F9E68BB.4060803@iol.ie |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-php |
On 30/04/2012 11:15, Archana K N wrote:
>
>
> I am using dreamweaver for creating web pages and requires php for
> connecting to server computerand database . Am also using pgadmin but
> can connect using that.
>
> Postgresql version- 9.
> Operating System- windows XP
> php version-5.2
> apache - 2.2
> and am using LAN
Hi Arachna,
[Please keep replies on-list; reply-all should do the job. Thanks!]
Is it possible that your Postgres server is listening on a different
port? If you can, could you post your postgresql.conf?
Also, are you maybe using a firewall locally on your Windows machine
which is blocking PHP?
Ray.
--
Raymond O'Donnell :: Galway :: Ireland
rod(at)iol(dot)ie