[postgis-users] solved: Connection Prob: Mapserv -> PostGIS

Lowther, David W dlowther at ou.edu
Mon Feb 3 06:07:46 PST 2003

Oops - looks like you fixed it. Congrats. I wonder if that is why mine works

-----Original Message-----
From: Bill Wheaton [mailto:gisgeek at nc.rr.com] 
Sent: Saturday, February 01, 2003 3:58 PM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] solved: Connection Prob: Mapserv -> PostGIS

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:

      CONNECTIONTYPE postgis
      NAME "countries"
      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 
this stuff.


Original post below----------

> Listers:
> 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 
> data source.
> 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 
> line.
> 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
>      CLASS
>        COLOR 205 92 82
>      END
> 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', '', '' (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
> including:
> 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.
> Bill

postgis-users mailing list postgis-users at postgis.refractions.net

More information about the postgis-users mailing list