SOLUTION - - RE: [postgis-users] Mapserver / PostGIS Layer
Lowther, David W
dlowther at ou.edu
Tue Jan 7 08:56:48 PST 2003
Thanks to all so much for your help with this. Frank, you won't believe
I have no idea WHY but here is the solution:
I was using IP address of Postgres server in my connection. As soon as I
changed from IP to name the problem was resolved.
So, host=18.104.22.168 wont work, but host=name.ou.edu works. But
22.214.171.124 works inside the same domain as postgres server.
Hope this will help someone sometime.
From: Lowther, David W [mailto:dlowther at ou.edu]
Sent: Monday, January 06, 2003 10:07 AM
To: Mapserver-Users (E-mail); Postgis-Users (E-mail)
Subject: [postgis-users] Mapserver / PostGIS Layer
Hi List and Happy New Year!
I have been struggling with a situation related to Mapserver and PostGIS
layers and I was hoping someone might help me out.
I have PostGIS running on Redhat. I have 2 web/mapserver (3.6.3) servers
(Intel WinNT4.0 IIS4.0) that access this PostGIS database. One is a test
server (located in the same domain as the PostGIS server) and one is a live
server (located in a separate domain from the PostGIS server). Using the
same connection information in a mapfile the test server can access and map
the PostGIS database with no problem - as could the live server when it was
in the domain - but the live server fails to connect with an error
(msPOSTGISLayerOpen(): Query error. Error parsing POSTGIS connection
information.) now that it is outside the domain. I am stressing the domain
issue here because I can't think of any other difference in the two servers.
- PGAdmin from the live server connects with no problem.
- ODBC connectivity from the live server works fine.
- The mapfiles on the test and live servers are identical except for
necessary directory differences.
- Checked password, hostname, connection type, socket connections enabled as
instructed in debug version of Mapserver build, but if they work on the test
server shouldn't they work on the live?
- Added live server to pg_hba.conf although test server does not appear and
host all 126.96.36.199 255.255.255.0 trust
- Initialize postmaster with -i option to allow tcp/ip connections.
- tcpip_socket=true in postgresql.conf.
- Tried using port=5432 in the CONNECTION param for mapfile - no difference
Heres the layer from the mapfile:
### ROADS ###
CONNECTION "user=*** password=*** dbname=*** host=***"
DATA "the_geom from (select oid,* from roads) as foo"
PROJECTION #GEOGRAPHIC NAD83
NAME "Grady Roads"
OUTLINECOLOR -1 -1 -1
COLOR 10 200 100
Would anyone be willing to try connecting to the PostGIS server using
Mapserver if I were to provide ip, db, un, and pwd info? I'm just completely
stuck at this point.
Thanks so much for everyone's help getting me to this point and thanks in
advance for all your help with this issue,
GEO Information Systems
University of Oklahoma
dlowther at ou.edu
postgis-users mailing list
postgis-users at postgis.refractions.net
More information about the postgis-users