[mapserver-users] Error parsing POSTGIS
Dave Blasby
dblasby at refractions.net
Tue Oct 16 10:09:03 PDT 2001
gispmpf at zipmail.com.br wrote:
> CONNECTION "user=postgres dbname=teste host=localhost"
> DATA "linha from teste"
>
> msPOSTGISLayerOpen(): Query error. Error parsing POSTGIS connection information.
>
> anybody can help me to see what is wrong?
João,
I dont know whats wrong. The message occurs if the postgresql client
library returns a
"CONNECTION_BAD" when it tries to open a connection.
You can try this:
Change your CONNECTION to:
CONNECTION "user=postgres password=**** dbname=teste host=localhost"
(but put the postgres password in instead of the "****")
This should fix the problem if postgresql is expecting a password for
the "postgres" user.
Otherwise, from a shell, try this:
% psql -U postgres teste
Welcome to psql, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
teste=# select * linda from teste;
...
If this works, then mapserver should be able to access the database.
What OS are you using?
Is the "mapserv" executable (Ie. the webserver) being run on the same
machine as postgresql? If not, you'll have to change the
"host=localhost" option and make sure you are running the postmaster
with the "-i" (TCP/IP connections enabled).
Esperançosamente isto ajudar-lhe-á
dave
More information about the MapServer-users
mailing list