[mapserver-users] Steel Error parsing POSTGIS
gispmpf at zipmail.com.br
gispmpf at zipmail.com.br
Tue Oct 16 19:21:55 PDT 2001
Thanks dave
I have tried your changes but i steel have the same problem
the: psql -U postgres teste
work ok and if i type
select linha from teste where id=1;
in the psql terminal work ok too.
but the following mapfile layer dont...
LAYER
CONNECTIONTYPE postgis
NAME 'Lakes & Rivers'
CONNECTION "user=postgres password=teste dbname=cadastro host=localhost"
DATA "linha from teste"
STATUS DEFAULT
TYPE LINE
FILTER "id = 1"
CLASS
COLOR 255 22 22
SYMBOL 'line'
SIZE 2
END
CLASS
COLOR 205 92 82
END
END
I'm using linux and postgres and mapserver are running in the same machine...
and seel returning the some error:
msPOSTGISLayerOpen(): Query error. Error parsing POSTGIS connection information.
any ideia?
Thanks
Joao.
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
___________________________________________________________
http://www.zipmail.com.br O e-mail que vai aonde você está.
More information about the MapServer-users
mailing list