[Mapserver-users] MapServer and PostGIS....

Gerald Buckmaster gbuckmaster at cox.net
Wed May 28 18:05:31 EDT 2003


Hi,

Don't have a direct answer for you but I have found a reliable technique to 
debugging/troubleshooting is to watch the web server error log.  For example:

tail -5 /usr/local/apache2/logs/error_log

will give you the last 5 errors logged by the (in this case, Apache) server.  
This technique has helped solve several mysteries when dealing with Mapserver 
and PHP.

You could extend this technique to the database error log, php error log, etc.

HTH

Gerald

On Wednesday 28 May 2003 07:32 am, Nick Ton wrote:
> Hi Everyone,
>
> I am a newbie to MapServer. I have read the PostGIS information page on
> how to connect MapServer to PostGIS. I have used the shp2pgsql function
> to dump some data into PostGIS. Everything seems to be ok on the PostGIS
> side.
>
> I have created a test map file to see if I can connect to PostGIS. Here is
> my map file that is being referenced by my test html page:
>
> -------------------- map file---------------------------------
> NAME S3EX3
>
> WEB
> 	TEMPLATE /home/nton/public_html/tutorial35/geo_test/s3ex3.html
> 	IMAGEURL "/~nton/public_html/tutorial35/geo_test/"
> END
>
> EXTENT -90. -30 20. 90
> SIZE 600 600
>
> LAYER
>     CONNECTIONTYPE postgis
>     NAME "airports_tbl"
>     # Connect to a remote spatial database
>     CONNECTION "user=postgres dbname=geo_db host=172.16.3.82"
>     # Get the lines from the 'the_geom' column of the 'airports_tbl' table
>     DATA "the_geom from airports_tbl"
>     STATUS ON
>     TYPE LINE
>     CLASS
>       COLOR 0 0 0
>     END
>   END
> END # end of map file
> -------------------- map file---------------------------------
>
> I had modified one of the tutorial html file to see if I can make it work.
> The
> html page returns properly but no image shows up in the designated area.
> I used "View Source" on the web browser to see where the image is generated
> and it seems to generate the .png file name for the image reference like
> this:
> <input type="image" name="img"
> src="/~nton/tutorial35/geo_test/S3EX31054076682716.png" border="0">
> But when I try to locate that image on the local directory it's not there.
> Has anyone experienced the same problems? Can some one tell me what
> I am doing wrong?
>
> Thanks In Advance,
> Nick
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list