[ms4w-users] RE: Anybody used mod_fcgid with MS4W

José Ramón López joseramonlopez at gmail.com
Thu May 24 09:27:57 EDT 2007


Hi list

Im trying to configure MS4W with fastcgi module.
I read the following instructions but allways sends to me an error 500. In
error logs appears the followin lines:

[Thu May 24 15:18:47 2007] [info] mod_fcgid: server
D:/ms4w/Apache/htdocs/fcgid/mapserv.exe(1204) started
[Thu May 24 15:18:47 2007] [warn] (OS 109)Ha terminado la canalización.  :
mod_fcgid: get overlap result error
[Thu May 24 15:18:47 2007] [error] [client 127.0.0.1] Premature end of
script headers: mapserv.exe

and these are my configuration lines on httpd.conf

DefaultInitEnv PROJ_LIB "d:/ms4w/proj/nad/"
DefaultInitEnv PATH
"d:/ms4w/Apache/htdocs/fcgid;d:/WINDOWS/system32;d:/WINDOWS;d:/WINDOWS/System32/Wbem;"
DefaultInitEnv windir "d:/WINDOWS"
DefaultInitEnv SystemRoot "d:/Windows"
DefaultInitEnv SystemDrive "d:"
DefaultInitEnv GDAL_DATA "d:/ms4w/gdaldata"
DefaultInitEnv GDAL_DRIVER_PATH "d:/ms4w/gdalplugins"
DefaultInitEnv TMP "d:/ms4w/tmp"
<Location /fcgid>
    SetHandler fcgid-script
    Options execCGI
    AllowOverride None
    Order allow,deny
    Allow from all
</Location>

Apache works fine and mapserver with cgi, but im having problems with
fasctgi.

Thxs Again

2007/4/26, Marcelo Oliveira <moliveira at geostats.com>:
>
> Hi There,
>
> I got MapServer to work in fastCGI mode with mod_fcgid and MS4W 1.40 on
> Windows Server 2003 R2 SP1.  Here is what I had to do:
>
> 1. Downloaded the mod_fcgid.so binary build from:
> http://www.apachelounge.com/download/mods/mod_fcgid-2.1-w32.zip
>
> 2. Placed the mod_fcgid.so on Apache's modules directory
>
> 3. Placed the httpd.exe.manifest file on Apache's bin directory (this
> file comes in the fcgid binary distribution from Apache Lounge)
>
> 4. Copied the entire contents of the cgi-bin directory to htdocs/fcgid
> (should probably move this so that it is parallel with cgi-bin)
>
> 5. Added the following lines to the Apache httpd.conf (these assume that
> you have ms4w on the c: drive and Windows installed on C:\Windows):
>
> LoadModule fcgid_module modules/mod_fcgid.so
> # set environment vars necessary for MapServer
> DefaultInitEnv PROJ_LIB "c:/ms4w/proj/nad/"
> DefaultInitEnv PATH
> "c:/ms4w/Apache/htdocs/fcgid;c:/WINDOWS/system32;c:/WINDOWS;c:/WINDOWS/S
> ystem32/Wbem;"
> DefaultInitEnv windir "c:/WINDOWS"
> DefaultInitEnv SystemRoot "c:/Windows"
> DefaultInitEnv SystemDrive "c:"
> DefaultInitEnv GDAL_DATA "c:/ms4w/gdaldata"
> DefaultInitEnv GDAL_DRIVER_PATH "c:/ms4w/gdalplugins"
> DefaultInitEnv TMP "c:/ms4w/tmp"
> <Location /fcgid>
>     SetHandler fcgid-script
>     Options execCGI
>     AllowOverride None
>     Order allow,deny
>     Allow from all
> </Location>
>
> 6. Restarted Apache
>
> 7. Changed the MapServer http calls from
> http://server/cgi-bin/mapserv.exe to http://server/fcgid/mapserv.exe
>
> 8. To benefit from the persistence of mapserv.exe in fastCGI mode you
> should add the following line to the LAYER sections in your map files
> with expensice connections (e.g. PostGIS, ArcSDE, etc):
>     PROCESSING "CLOSE_CONNECTION=DEFER"
>
> That's it! After getting this working I saw a four-fold improvement on
> the drawing of maps (from 0.4 to 0.1 second on average, using a large
> PostGIS database with the entire US's street network and other
> background layers).
>
> I hope this helps other people out there trying to use MapServer in
> fastCGI mode and without the resources to build fcgi-2.4.0 from scratch.
>
> M
>
> --------------
> Marcelo Simas Oliveira
> GeoStats LP
> 530 Means St., Ste. 310
> Atlanta, Georgia 30318
> (404) 588-1004
> www.geostats.com
>
> -----Original Message-----
> From: Marcelo Oliveira
> Sent: Wednesday, April 25, 2007 8:32 PM
> To: ms4w-users at lists.maptools.org
> Subject: Anybody used mod_fcgid with MS4W
>
>
> Hello,
>
> I am experimenting with MS4W 1.40 mod_fcgid
> (http://fastcgi.coremail.cn/) and it keeps giving the following error
> when trying to connect to PostGIS:
>
> msDrawMap(): Image handling error. Failed to draw layer named 'States'.
> msPOSTGISLayerOpen(): Query error. couldnt make connection to DB with
> connect string 'user=postgres password=********* host=cabral port=5432
> dbname=gisdata'.
>
> Error reported was 'could not translate host name &quot;cabral&quot; to
> address: Unknown host '.
>
> Has anybody seen this before, or let me rephrase that, has anybody
> experimented with mod_fcgid before?
>
> Thanks,
>
> M
>
> --------------
> Marcelo Simas Oliveira
> GeoStats LP
> 530 Means St., Ste. 310
> Atlanta, Georgia 30318
> (404) 588-1004
> www.geostats.com
>
>
>
>
> _______________________________________________
> ms4w-users mailing list
> ms4w-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ms4w-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ms4w-users/attachments/20070524/6d148094/attachment.html


More information about the ms4w-users mailing list