Re: Unknown Host in pg_connect()

From: "PG Explorer" <pgmail(at)pgexplorer(dot)com>
To: "Thorsten Haude" <postgresql(at)thorstenhau(dot)de>, "PostgreSQL PHP ML" <pgsql-php(at)postgresql(dot)org>
Subject: Re: Unknown Host in pg_connect()
Date: 2002-03-24 15:07:05
Message-ID: 002a01c1d345$929c3740$c80ba8c0@sabex.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

Try Omitting host=localhost or start the postmaster with -i

$dbh = pg_connect("dbname=inventory, user=inventoryUser, password=secret");

http://www.pgexplorer.com
GUI tool for Postgres

----- Original Message -----
From: "Thorsten Haude" <postgresql(at)thorstenhau(dot)de>
To: "PostgreSQL PHP ML" <pgsql-php(at)postgresql(dot)org>
Sent: Sunday, March 24, 2002 2:41 PM
Subject: [PHP] Unknown Host in pg_connect()

> Hi,
>
> I'm trying to connect to PostgreSQL using pg_connect:
> $dbh = pg_connect("host=localhost, dbname=inventory, user=inventoryUser,
password=secret");
>
> However, I get an unknow host for localhost:
> - - - Schnipp - - -
> Warning: Unable to connect to PostgreSQL server: connectDBStart() --
> unknown hostname: localhost
> - - - Schnapp - - -
>
> gethostbyname() has no problems to resolve localhost.
>
> This is certainly an oversight on my part, but I couldn't find
> anything in the books or in the FAQ.
>
> tia,
> Thorsten
> --
> Death to all fanatics!
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

In response to

Responses

Browse pgsql-php by date

  From Date Subject
Next Message Thorsten Haude 2002-03-24 15:34:54 Re: Unknown Host in pg_connect()
Previous Message Thorsten Haude 2002-03-24 12:41:55 Unknown Host in pg_connect()