[postgis-users] Connection Prob: Mapserv -> PostGIS (was: shp2img OK, mapserver not OK)

Bill Wheaton gisgeek at nc.rr.com
Sat Feb 1 09:18:18 PST 2003


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 

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"
        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', '', '' (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 mailing list