[postgis-users] shp2img OK, mapserver not OK

Lowther, David W dlowther at ou.edu
Fri Jan 31 08:14:47 PST 2003


Bill,

Don't know if it wil help but I had a similar problem and changed HOST from
IP address to machine name in my CONNECTION and it fixed it.  129.x.x.x ->
machine.place.com No idea why that mattered.

My situation was a bit more complex - PostGIS on LINUX / Mapserver in Win32
- different domains... 

Might give that a try though.

Dave

-----Original Message-----
From: Bill Wheaton [mailto:gisgeek at nc.rr.com] 
Sent: Friday, January 31, 2003 7:11 AM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] shp2img OK, mapserver not OK


Hello Listers:

I've built postgresql, postgis, and mapserver (with postgis support).   
I can load a shapefile into postgis and everything looks good.  I know  
my mapserver install works because I can display shapefiles with it.   
But when I try to use a postgis connection as the data source, I get a  
white box.  When I run shp2img with the same map file, it gives no  
errors and successfully returns an image of data that came out of  
postgis.  So, ultimately, the problem is that mapserver won't return an  
image from a postgis source whereas shp2img will return an image from  
the same mapfile.  When running the mapfile through mapserver, the log  
file indicates that it completes normally, but no image.  I can add a  
second layer to this same mapfile that accesses a shapefile and that  
shapefile is returned by mapserver, but not the layer whose source is  
postgis.  Any ideas on how to troubleshoot this?  I'm somewhat of a  
newbie to this, so apologies if this is something I should  
know...thanks in advance...

environment:
postgreSQL 7.3
postgis 0.7.3 (from CVS about a week ago)
mapserver 3.6.4
Macosx 10.2.3

Mapfile:
------------------------------------------------------------------------ 
-------
NAME TEST
SIZE 300 150
EXTENT -180 -90 180 90
SHAPEPATH "data"

WEB
    LOG "pgmap.log"
END


LAYER
      CONNECTIONTYPE postgis
      NAME "countries"
      CONNECTION "user=postgres dbname=test host=192.168.0.2"
      DATA "the_geom from cntry_tab"
      STATUS ON
      TYPE POLYGON
      CLASS
        COLOR 205 92 82
      END
END

END
----------------------------------------------------------------------

html file:
---------------------------------------------------------------------
<HTML>

<BODY>

<img border="1"  
src="/cgi-bin/mapserv?map=/Library/WebServer/Documents/slm/map_server/ 
pgmap.map&mode=map">

</BODY>
</HTML>
------------------------------------------------------------------------ 
---

Cheers...
Bill


_______________________________________________
postgis-users mailing list postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list