Unknown Host in pg_connect()

From: Thorsten Haude <postgresql(at)thorstenhau(dot)de>
To: PostgreSQL PHP ML <pgsql-php(at)postgresql(dot)org>
Subject: Unknown Host in pg_connect()
Date: 2002-03-24 12:41:55
Message-ID: 20020324124155.GH981@eumel.yoo.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

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!

Responses

Browse pgsql-php by date

  From Date Subject
Next Message PG Explorer 2002-03-24 15:07:05 Re: Unknown Host in pg_connect()
Previous Message Gurudutt 2002-03-19 05:19:18 Fwd: [PHP Classes] Added a new class: PGSQL_Connection