[FWTools] Mapserver Install/Configuration Problems

Frank Warmerdam fwarmerdam at gmail.com
Thu Mar 17 13:52:36 EST 2005


On Fri, 18 Mar 2005 06:47:39 +1300 (NZDT), chris.dimeo at opspatial.com
<chris.dimeo at opspatial.com> wrote:
> Hi all-
> 
> I'm taking a first pass at using Mapserver as supplied in the latest
> FWTools release (0.9.6).
> 
> After I've extracted the files, installed the package, changed the PATH
> variable and copied 'mapserv' to my cgi-bin directory, I'm getting an
> Internal Server Error.
> 
> I'm using a test from the MapServer CGI Tutorial where they say you can
> test the webserver by typing:
> 
> http://(url)/cgi-bin/mapserv?
> 
> This is when I get the error.  Are there any permissions settings that
> need to be set or any other blatent newbie mistakes I could be making?
> Any tips on what environment variables to look at?

Chris, 

The FWTools mapserv has alot of dependencies, and it is critical 
that it pick them up from the shared libraries distributed with the binary.
If you want to move things around you need to be very careful about
how you control various related environment variables.  

When I want to deploy the FWTools distribution on Linux for a
mapserver server I normally leave FWTools in place (but having
run the install script), and create a cgi-bin script to invoke it using
the normal "setup".  So for my http://maps.gdal.org/ server (Fedora
Core 2) I just created a "mapserv_dem" script in my cgi-bin directory 
that looks like:

#!/bin/sh

export MS_MAPFILE=/home/warmerda/maps/srtm30plus.map
. /opt/FWTools-linux-0.9.6/fwtools_env.sh
exec /opt/FWTools-linux-0.9.6/bin/mapserv "$*"

This ensures that the environment is setup normally using the
fwtools_env.sh script and then execs the FWTools mapserv
executable.  I also set the MS_MAPFILE so that it does not need
to appear in the URL. 

I would encourage you to use this approach, and it will avoid
all issues with mixed up shared libraries. 

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent


More information about the FWTools mailing list