Help with pg_connect() command.

From: Steve Kershaw <steve_kershaw(at)yahoo(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Help with pg_connect() command.
Date: 2003-05-10 23:20:54
Message-ID: 20030510232054.46709.qmail@web12101.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello,

I'm having problems connecting to a postgre database
from my PHP code. The code I'm using is:

$conn = pg_connect("host=localhost port=5432
dbname=movies ")
or die("Couldn't make a connection");

And the warning message I get is:

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
/var/www/html/testpostgre.php on line 11
Couldn't make a connection

Am I missing anything here? Thanks in advance for your
help.

Steve

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Terence Ng 2003-05-11 01:23:24 Re: [ADMIN] Multilingual database
Previous Message Ian Barwick 2003-05-10 11:22:42 Re: Multilingual database