pg.ddx.io pgsql-php@postgresql.org mailing list archive
help / color / mirror / Atom feedUnknown Host in pg_connect()
3+ messages / 2 participants
[nested] [flat]
* Unknown Host in pg_connect()
@ 2002-03-24 12:41 Thorsten Haude <postgresql@thorstenhau.de>
0 siblings, 1 reply; 3+ messages in thread
From: Thorsten Haude @ 2002-03-24 12:41 UTC (permalink / raw)
To: 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!
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Unknown Host in pg_connect()
@ 2002-03-24 15:07 PG Explorer <pgmail@pgexplorer.com>
parent: Thorsten Haude <postgresql@thorstenhau.de>
0 siblings, 1 reply; 3+ messages in thread
From: PG Explorer @ 2002-03-24 15:07 UTC (permalink / raw)
To: Thorsten Haude <postgresql@thorstenhau.de>; 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@thorstenhau.de>
To: "PostgreSQL PHP ML" <pgsql-php@postgresql.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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Unknown Host in pg_connect()
@ 2002-03-24 15:34 Thorsten Haude <postgresql@thorstenhau.de>
parent: PG Explorer <pgmail@pgexplorer.com>
0 siblings, 0 replies; 3+ messages in thread
From: Thorsten Haude @ 2002-03-24 15:34 UTC (permalink / raw)
To: pgsql-php
Hi,
>> I'm trying to connect to PostgreSQL using pg_connect:
>> $dbh = pg_connect("host=localhost, dbname=inventory, user=inventoryUser,
>password=secret");
It's a simple syntax error, the commas are not required.
Thorsten
--
The privacy of correspondence, posts and telecommunications shall be inviolable.
- Grundgesetz, Article 10, Sec. 1
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2002-03-24 15:34 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-03-24 12:41 Unknown Host in pg_connect() Thorsten Haude <postgresql@thorstenhau.de>
2002-03-24 15:07 ` PG Explorer <pgmail@pgexplorer.com>
2002-03-24 15:34 ` Thorsten Haude <postgresql@thorstenhau.de>
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