Hi list<br><br>Im trying to configure MS4W with fastcgi module.<br>I read the following instructions but allways sends to me an error 500. In error logs appears the followin lines:<br><br>[Thu May 24 15:18:47 2007] [info] mod_fcgid: server D:/ms4w/Apache/htdocs/fcgid/mapserv.exe(1204) started
<br>[Thu May 24 15:18:47 2007] [warn] (OS 109)Ha terminado la canalización.&nbsp; : mod_fcgid: get overlap result error<br>[Thu May 24 15:18:47 2007] [error] [client <a href="http://127.0.0.1">127.0.0.1</a>] Premature end of script headers: 
mapserv.exe<br><br>and these are my configuration lines on httpd.conf<br><br>DefaultInitEnv PROJ_LIB &quot;d:/ms4w/proj/nad/&quot;<br>DefaultInitEnv PATH &quot;d:/ms4w/Apache/htdocs/fcgid;d:/WINDOWS/system32;d:/WINDOWS;d:/WINDOWS/System32/Wbem;&quot;
<br>DefaultInitEnv windir &quot;d:/WINDOWS&quot;<br>DefaultInitEnv SystemRoot &quot;d:/Windows&quot;<br>DefaultInitEnv SystemDrive &quot;d:&quot;<br>DefaultInitEnv GDAL_DATA &quot;d:/ms4w/gdaldata&quot;<br>DefaultInitEnv GDAL_DRIVER_PATH &quot;d:/ms4w/gdalplugins&quot;
<br>DefaultInitEnv TMP &quot;d:/ms4w/tmp&quot;<br>&lt;Location /fcgid&gt;<br>&nbsp;&nbsp;&nbsp; SetHandler fcgid-script<br>&nbsp;&nbsp;&nbsp; Options execCGI<br>&nbsp;&nbsp;&nbsp; AllowOverride None<br>&nbsp;&nbsp;&nbsp; Order allow,deny<br>&nbsp;&nbsp;&nbsp; Allow from all<br>&lt;/Location&gt;<br>
<br>Apache works fine and mapserver with cgi, but im having problems with fasctgi.<br><br>Thxs Again<br><br><div><span class="gmail_quote">2007/4/26, Marcelo Oliveira &lt;<a href="mailto:moliveira@geostats.com">moliveira@geostats.com
</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi There,<br><br>I got MapServer to work in fastCGI mode with mod_fcgid and MS4W 
1.40 on<br>Windows Server 2003 R2 SP1.&nbsp;&nbsp;Here is what I had to do:<br><br>1. Downloaded the mod_fcgid.so binary build from:<br><a href="http://www.apachelounge.com/download/mods/mod_fcgid-2.1-w32.zip">http://www.apachelounge.com/download/mods/mod_fcgid-2.1-w32.zip
</a><br><br>2. Placed the mod_fcgid.so on Apache&#39;s modules directory<br><br>3. Placed the httpd.exe.manifest file on Apache&#39;s bin directory (this<br>file comes in the fcgid binary distribution from Apache Lounge)<br>
<br>4. Copied the entire contents of the cgi-bin directory to htdocs/fcgid<br>(should probably move this so that it is parallel with cgi-bin)<br><br>5. Added the following lines to the Apache httpd.conf (these assume that
<br>you have ms4w on the c: drive and Windows installed on C:\Windows):<br><br>LoadModule fcgid_module modules/mod_fcgid.so<br># set environment vars necessary for MapServer<br>DefaultInitEnv PROJ_LIB &quot;c:/ms4w/proj/nad/&quot;
<br>DefaultInitEnv PATH<br>&quot;c:/ms4w/Apache/htdocs/fcgid;c:/WINDOWS/system32;c:/WINDOWS;c:/WINDOWS/S<br>ystem32/Wbem;&quot;<br>DefaultInitEnv windir &quot;c:/WINDOWS&quot;<br>DefaultInitEnv SystemRoot &quot;c:/Windows&quot;
<br>DefaultInitEnv SystemDrive &quot;c:&quot;<br>DefaultInitEnv GDAL_DATA &quot;c:/ms4w/gdaldata&quot;<br>DefaultInitEnv GDAL_DRIVER_PATH &quot;c:/ms4w/gdalplugins&quot;<br>DefaultInitEnv TMP &quot;c:/ms4w/tmp&quot;<br>&lt;Location /fcgid&gt;
<br>&nbsp;&nbsp;&nbsp;&nbsp;SetHandler fcgid-script<br>&nbsp;&nbsp;&nbsp;&nbsp;Options execCGI<br>&nbsp;&nbsp;&nbsp;&nbsp;AllowOverride None<br>&nbsp;&nbsp;&nbsp;&nbsp;Order allow,deny<br>&nbsp;&nbsp;&nbsp;&nbsp;Allow from all<br>&lt;/Location&gt;<br><br>6. Restarted Apache<br><br>7. Changed the MapServer http calls from
<br><a href="http://server/cgi-bin/mapserv.exe">http://server/cgi-bin/mapserv.exe</a> to <a href="http://server/fcgid/mapserv.exe">http://server/fcgid/mapserv.exe</a><br><br>8. To benefit from the persistence of mapserv.exe
 in fastCGI mode you<br>should add the following line to the LAYER sections in your map files<br>with expensice connections (e.g. PostGIS, ArcSDE, etc):<br>&nbsp;&nbsp;&nbsp;&nbsp;PROCESSING &quot;CLOSE_CONNECTION=DEFER&quot;<br><br>That&#39;s it! After getting this working I saw a four-fold improvement on
<br>the drawing of maps (from 0.4 to 0.1 second on average, using a large<br>PostGIS database with the entire US&#39;s street network and other<br>background layers).<br><br>I hope this helps other people out there trying to use MapServer in
<br>fastCGI mode and without the resources to build fcgi-2.4.0 from scratch.<br><br>M<br><br>--------------<br>Marcelo Simas Oliveira<br>GeoStats LP<br>530 Means St., Ste. 310<br>Atlanta, Georgia 30318<br>(404) 588-1004<br>
<a href="http://www.geostats.com">www.geostats.com</a><br><br>-----Original Message-----<br>From: Marcelo Oliveira<br>Sent: Wednesday, April 25, 2007 8:32 PM<br>To: <a href="mailto:ms4w-users@lists.maptools.org">ms4w-users@lists.maptools.org
</a><br>Subject: Anybody used mod_fcgid with MS4W<br><br><br>Hello,<br><br>I am experimenting with MS4W 1.40 mod_fcgid<br>(<a href="http://fastcgi.coremail.cn/">http://fastcgi.coremail.cn/</a>) and it keeps giving the following error
<br>when trying to connect to PostGIS:<br><br>msDrawMap(): Image handling error. Failed to draw layer named &#39;States&#39;.<br>msPOSTGISLayerOpen(): Query error. couldnt make connection to DB with<br>connect string &#39;user=postgres password=********* host=cabral port=5432
<br>dbname=gisdata&#39;.<br><br>Error reported was &#39;could not translate host name &amp;quot;cabral&amp;quot; to<br>address: Unknown host &#39;.<br><br>Has anybody seen this before, or let me rephrase that, has anybody
<br>experimented with mod_fcgid before?<br><br>Thanks,<br><br>M<br><br>--------------<br>Marcelo Simas Oliveira<br>GeoStats LP<br>530 Means St., Ste. 310<br>Atlanta, Georgia 30318<br>(404) 588-1004<br><a href="http://www.geostats.com">
www.geostats.com</a><br><br><br><br><br>_______________________________________________<br>ms4w-users mailing list<br><a href="mailto:ms4w-users@lists.maptools.org">ms4w-users@lists.maptools.org</a><br><a href="http://lists.maptools.org/mailman/listinfo/ms4w-users">
http://lists.maptools.org/mailman/listinfo/ms4w-users</a><br></blockquote></div><br>