Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B62302E01C1 for ; Mon, 10 Mar 2008 17:06:14 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 76460-01 for ; Mon, 10 Mar 2008 17:06:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from paris.boulder.noaa.gov (paris.boulder.noaa.gov [140.172.10.145]) by postgresql.org (Postfix) with ESMTP id A55572E01B6 for ; Mon, 10 Mar 2008 17:06:08 -0300 (ADT) Received: from lynx.ngdc.noaa.gov (lynx.ngdc.noaa.gov [140.172.179.24]) by email.boulder.noaa.gov (iPlanet Messaging Server 5.2 HotFix 2.01 (built Aug 26 2004)) with ESMTPSA id <0JXJ0080R6I77E@email.boulder.noaa.gov> for pgsql-php@postgresql.org; Mon, 10 Mar 2008 20:06:07 +0000 (GMT) Date: Mon, 10 Mar 2008 14:06:07 -0600 From: John Cartwright Subject: Re: pg_connect fails, pgsql works In-reply-to: <47D58181.2080205@iol.ie> To: rod@iol.ie Cc: pgsql-php@postgresql.org Message-id: <47D594AF.8090105@noaa.gov> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7BIT User-Agent: Thunderbird 2.0.0.12 (X11/20080213) References: <47D571EF.8020408@noaa.gov> <47D58181.2080205@iol.ie> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/7 X-Sequence-Number: 3832 Thanks for your suggestion Ray, but I get the same error even w/o the values being single-quoted. -- john Raymond O'Donnell wrote: > On 10/03/2008 17:37, John Cartwright wrote: > >> $con = pg_connect("host='postgres1.ngdc.noaa.gov' port=5432 >> sslmode='allow' user='test' password='mypassword' dbname='test'") > > I don't think you need to quote the host, uid, etc - try it without > the single quotes, e.g. > > "host=postgres1.ngdc.noaa.gov port=5432 sslmode=allow user=test [....]" > > HTH, > > Ray. > > --------------------------------------------------------------- > Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland > rod@iol.ie > ---------------------------------------------------------------