postgis connection problem.
Paul Ramsey
pramsey at REFRACTIONS.NET
Wed Jan 10 16:42:02 PST 2007
Try this and see if it works better. Local connections are the default...
CONNECTION "dbname=castle user=dave password=foobar"
Dave Potts wrote:
> I am trying to connect to postgres database on my local machine
>
> The connect strings reads
>
> CONNECTION "dbname=castle user=dave password=foobar host=localhost
> port=5432"
>
> This gives an msPOSTGISLAyerOpen(): Query error, the reported error is
> "unknown hostname: localhost"
>
> Doing a nslookup on localhost gives the expected answer off 127.0.0.1
>
> Using the value 127.0.0.1 instead of the string localhost, gives the
> same error, but reporting the error unknown host name 127.0.0.1
>
> A telnet session to localhost 5432 connects , therefore the database is
> running on localhost, I am not having any problems resolving names.
>
> A psql session to the database castle with the login dave and the
> password foobar works correctly
>
>
> SO why the error, any suggestions ?
>
> Dave.
More information about the MapServer-users
mailing list