Received: from homer.websystems.co.za (unknown [196.25.70.70]) by postgresql.org (Postfix) with ESMTP id 930FD4759CC for ; Sun, 24 Mar 2002 10:07:32 -0500 (EST) Received: from hano (bnb53-01-p230.nt.saix.net [155.239.180.230]) by homer.websystems.co.za (8.11.0/8.11.0) with SMTP id g2OFFIQ17391; Sun, 24 Mar 2002 17:15:18 +0200 Message-ID: <002a01c1d345$929c3740$c80ba8c0@sabex.com> From: "PG Explorer" To: "Thorsten Haude" , "PostgreSQL PHP ML" References: <20020324124155.GH981@eumel.yoo.net> Subject: Re: Unknown Host in pg_connect() Date: Sun, 24 Mar 2002 17:07:05 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200203/43 X-Sequence-Number: 1012 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" To: "PostgreSQL PHP ML" 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