fastcgi & mapserver

Frank Warmerdam warmerdam at POBOX.COM
Tue Mar 7 15:43:21 EST 2006


Tim Bowden wrote:
> Hi,
> 
> We have been testing mapserver with fastcgi and it is much faster
> getting data from sde sources than as a plain old cgi app.  Our problem
> with it is using a wrapper script- The wrapper script is not a fastcgi
> application and when we call mapserv from within the wrapper script it
> doesn't get treated as a fastcgi application.  Does anyone have any
> pointers as to how we can mix the two?

Tim,

Interesting point.  Is the wrapper script just a shell script setting
some environment variables?  While I generally like this approach, for
fastcgi you may be better off setting the environment variables in
the apache conf.

My fastcgi apache conf on linux looks like:

LoadModule fastcgi_module modules/mod_fastcgi.so
AddHandler fastcgi-script fcgi
FastCgiConfig -initial-env 
LD_LIBRARY_PATH=/home/warmerda/gdal:/usr/local/pgsql/lib:/usr/local/lib:/usr/local/grass-6.0.0/lib:/usr/local/lib/mysql

I assume you can use the -initial-env switch to set more variables if
needed.   Of course, if you want to have different settings for different
services this approach may not work easily.

Fastcgi can be quirky for stuff like this!

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    | President OSGF, http://osgeo.org



More information about the mapserver-users mailing list