Re: Problems connecting to Postgre from PHP
| From: | Jason Wong | Date: | Sat, 10 May 2003 08:33:59 +0000 |
| Subject: | Re: Problems connecting to Postgre from PHP | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-27636@lists.php.net to get a copy of this message | ||
On Saturday 10 May 2003 06:24, Steve Kershaw wrote:
> 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
The message seems quite explicit.
Are you able to connect using psql and the above parameters? If not, look for
help on the postgresql lists.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-db
------------------------------------------
/*
Seek simplicity -- and distrust it.
-- Alfred North Whitehead
*/