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.
From: pgsql-php-owner@postgresql.org [mailto:pgsql-php-owner@postgresql.org] On Behalf Of Archana K N
Sent: Monday, April 30, 2012 1:02 PM
To: pgsql-php@postgresql.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
 --------------------