[postgis-users] solved: Connection Prob: Mapserv -> PostGIS
gisgeek at nc.rr.com
Sat Feb 1 13:58:21 PST 2003
Thanks to Paul Ramsey whose suggestion to change the STATUS from 'ON'
to 'DEFAULT' in my mapfile solved my problem...So the mapfile now reads:
CONNECTION "user=postgres dbname=test host=machine.domain.com"
DATA "the_geom from cntry_tab"
STATUS DEFAULT <---changed from 'ON'
COLOR 205 92 82
I'm not sure why this solved it...but I'm thankful that it works. The
developments that are going on between mapserver and postgis are really
exiting and I think the development teams are making great progress on
Original post below----------
> This is a follow up to a request for help from last week. I'm still
> having problems getting mapserver to create an image from a postgis
> PostGIS is working correctly. Started with the -i option, can connect
> to it on the command line and through phppgadmin. So it is accepting
> tcp/ip connections.
> I have geometry in postGIS. Ran shapefile loader. Created indexes as
> described in postGIS documentation. Can query for geometry on command
> Mapserver is installed and working correctly. Was built with postgis
> support. Generates images from shapefile data sources.
> The layer portion of my mapfile looks like this:
> CONNECTIONTYPE postgis
> NAME "countries"
> CONNECTION "user=postgres dbname=test host=machine.domain.com"
> DATA "the_geom from cntry_tab"
> STATUS ON
> TYPE POLYGON
> COLOR 205 92 82
> The result is always a white box...
> In the connection string, I have tried:
> 1) with password, and without password
> 2) with port=5432 and without port=5432
> 3) with host= 'localhost', '127.0.0.1', '192.168.0.2' (the internal IP
> address of the machine), and 'machine.local' and 'machine.domain.com'.
> 4) I have also done some things suggested on the mapserver lists
> making sure postgresql.conf has tcpip_socket=true
> making sure pg_hba.conf includes a line for my machine...
> The frustrating thing about this is that I can get no information from
> mapserv or postgis about the nature of the problem. In other words, I
> can't find any error message to help locate the problem. The mapserv
> log file indicates successful completion of the request and shp2img
> creates the image correctly with no indication of any errors. Is there
> any other log file that might direct me to the nature of the problem?
> Again-- my environment is:
> Mapserver 3.6.4 (with postgis support)
> postgres 7.3.1
> postgis from the cvs as of about 1/25/03.
> everything was built on and is running on Macos X 10.2.3
> Thanks again for any suggestions for further troubleshooting ideas.
More information about the postgis-users