[Mapserver-users] SOLUTION - - RE: [postgis-users] Mapserver / PostGIS Layer
Lowther, David W
dlowther at ou.edu
Tue Jan 7 08:56:48 PST 2003
Hello All,
Thanks to all so much for your help with this. Frank, you won't believe
this...
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=111.111.111.111 wont work, but host=name.ou.edu works. But
111.111.111.111 works inside the same domain as postgres server.
Go figure.
Hope this will help someone sometime.
Dave
-----Original Message-----
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
connects successfully:
host all 216.226.17.176 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
in behaviour.
Heres the layer from the mapfile:
### ROADS ###
LAYER
GROUP "Selected"
NAME "gradyRoads"
CONNECTIONTYPE postgis
CONNECTION "user=*** password=*** dbname=*** host=***"
DATA "the_geom from (select oid,* from roads) as foo"
TYPE LINE
STATUS OFF
PROJECTION #GEOGRAPHIC NAD83
proj=longlat
ellps=GRS80
no_defs
END
TEMPLATE "IDgradyRoads.htm"
CLASS#
NAME "Grady Roads"
SYMBOL "line"
SIZE 2
OUTLINECOLOR -1 -1 -1
COLOR 10 200 100
END
METADATA
legend_order "5"
END
END
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,
David Lowther
Software Engineer
GEO Information Systems
University of Oklahoma
dlowther at ou.edu
(405) 325-3131
http://www.geo.ou.edu
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the MapServer-users
mailing list