pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Edric Bulalacao <egb@tonesoft.com>
To: pgsql-php@postgresql.org
Subject: pg_connect problem
Date: Wed, 3 Sep 2003 10:36:14 -0700
Message-ID: <HJENIMPAKDMENODLAJNMMEEKCFAA.egb@tonesoft.com> (raw)

I’m a PHP/PostGRE newbie.  I’m getting this error:

Warning: pg_connect(): Unable to connect to PostgreSQL server: could not
connect to server: Connection refused Is the server running on host
localhost and accepting TCP/IP connections on port 5432? . in
/export/home/tsc/a/delete-action.phtml on line 156
Couldn't make a connection!

This is the code I’m trying to run:
$connection = pg_connect("host=localhost dbname=address user=address
password=address");

This is my pg_hba.conf
local  all      all             password

This is the output of “netstat –an | grep 5432”
unix  2      [ ACC ]     STREAM     LISTENING     27649  /tmp/.s.PGSQL.5432

I’m able to do “psql –u address” and supply and username and password as any
Unix user defined in the system.


Can anyone tell me what I’m doing wrong?  Thanks.

view thread (3+ messages)  latest in thread

Message-ID: <HJENIMPAKDMENODLAJNMMEEKCFAA.egb@tonesoft.com>
Permalink:  ../HJENIMPAKDMENODLAJNMMEEKCFAA.egb@tonesoft.com/
Also on:    postgresql.org/message-id/HJENIMPAKDMENODLAJNMMEEKCFAA.egb@tonesoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: egb@tonesoft.com
  Subject: Re: pg_connect problem
  In-Reply-To: <HJENIMPAKDMENODLAJNMMEEKCFAA.egb@tonesoft.com>
  References: <HJENIMPAKDMENODLAJNMMEEKCFAA.egb@tonesoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox