<HTML dir=ltr><HEAD>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6000.16825" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText91663 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Just replying to my own post with the solution/workaround we found.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>loadParams() looks for the query string in the CGI enviroment variables and parses them to fill the OWSRequest object. Now, for whatever reason our FastCGI setup didn't have the expected parameters and this was causing the process to die as explained in <A href="http://mapserver.org/ogc/mapscript.html#use-in-non-cgi-environments-mod-php-etc">http://mapserver.org/ogc/mapscript.html#use-in-non-cgi-environments-mod-php-etc</A>.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>So we are now just parsing the query string and manually filling the Request object.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2></FONT>&nbsp;</DIV></DIV>
<DIV id=idSignature58289 dir=ltr><PRE>__________________________________
Keith Moss
Satellite Remote Sensing Services
Information Access Division
Landgate
65 Brockway Road, FLOREAT WA 6014
PO Box 741 Wembley WA 6913
Ph. (08) 9387 0332 | Fx. (08) 9383 7142
keith.moss@landgate.wa.gov.au
www.landgate.wa.gov.au</PRE></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> mapserver-users-bounces@lists.osgeo.org on behalf of Keith Moss<BR><B>Sent:</B> Tue 19/05/2009 13:12<BR><B>To:</B> mapserver-users@lists.osgeo.org<BR><B>Subject:</B> [mapserver-users] FastCGI &amp; PHP MapScript Problem<BR></FONT><BR></DIV>
<DIV dir=ltr>
<DIV id=idOWAReplyText15266 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Hi all,</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>I've run into a problem with running PHP MapScript and FastCGI on a development server I've been setting up. It's a Windows Server 2003 box with IIS6 and I've installed MapServer 5.4 and PHP 5.2.9. I obtained the necessary dlls for PHP MapScript from the MS4W MapServer&nbsp;5.4.0rc2 release. The FastCGI install is version 1.0 from iis.net.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>I tested the basic install before adding FastCGI and everything worked properly in my test file (a GetCapabilities request on a simple one image mapfile). I couldn't find any IIS-specific install instructions for FastCGI so I attempted to adapt the instructions given here for Apache: <A href="http://www.maptools.org/ms4w/index.phtml?page=README_INSTALL.html#f-fastcgi">http://www.maptools.org/ms4w/index.phtml?page=README_INSTALL.html#f-fastcgi</A></FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>Running the GetCapabilities request again throws me the following 500 error:</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr>
<TABLE cellSpacing=10 width=500 border=0>
<TBODY>
<TR>
<TD>
<H1><FONT size=2>FastCGI Error</FONT></H1><FONT size=2>The FastCGI Handler was unable to process the request. 
<HR>
</FONT>
<P><FONT size=2>Error Details:</FONT></P>
<UL>
<LI><FONT size=2>The FastCGI process exited unexpectedly</FONT> 
<LI><FONT size=2>Error Number: -2147467259 (0x80004005).</FONT> 
<LI><FONT size=2>Error Description: Unspecified error </FONT></LI></UL>
<H2><FONT size=2>HTTP Error 500 - Server Error.<BR>Internet Information Services (IIS)</FONT></H2>
<P><FONT face=Arial size=2></FONT>&nbsp;</P>
<P><FONT face=Arial size=2>I've reduced the problem to a simple test case that creates a request object and initialises it.</FONT></P>
<P><FONT face=Arial size=2>&lt;?php<BR></FONT><FONT face=Arial size=2>$request = ms_newowsrequestobj();<BR>$request-&gt;loadparams();<BR></FONT><FONT face=Arial size=2>?&gt;</FONT></P>
<P><FONT face=Arial size=2>The loadparams() call is the source of the problem but I've been completely unable to find a solution.</FONT></P>
<P><FONT face=Arial size=2>So far this is the only piece of code I can find that will cause the error. All other normal PHP operations and MapScript code that I've tried work without issue</FONT></P>
<P><FONT face=Arial size=2>This one has me quite stumped, any help would be much appreciated.</FONT></P>
<P><FONT face=Arial size=2>cheers</FONT></P></TD></TR></TBODY></TABLE></DIV></DIV>
<DIV id=idSignature60262 dir=ltr><PRE>__________________________________
Keith Moss<BR>Satellite Remote Sensing Services
Landgate
65 Brockway Road, FLOREAT WA 6014
PO Box 741 Wembley WA 6913
Ph. (08) 9387 0332 | Fx. (08) 9383 7142
keith.moss@landgate.wa.gov.au
www.landgate.wa.gov.au
</PRE></DIV>
<P style="MARGIN-TOP: 5pt; MARGIN-LEFT: 36pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Arial'">This e-mail and any files transmitted with it are intended only for the use of the addressee(s). It may contain information that is confidential and privileged, in which case neither is intended to be waived or lost by mistaken delivery to you. If you are not an intended recipient, any use, interference with, disclosure, distribution or copying of this material is unauthorised and prohibited. If you receive this e-mail in error, please notify the sender by return e-mail and delete the message and any attachments from your system. Unless specifically indicated, this e-mail does not constitute formal advice or commitment by the sender or the Western Australian Land Information Authority (Landgate). Information in this message not relating to the official business of Landgate shall be understood as neither given nor endorsed by it. It is your responsibility to check any attachments for viruses and defects before opening or sending them on. Landgate&#8217;s liability is limited to re-supplying affected attachments. </SPAN></P>
<P style="MARGIN-TOP: 5pt; MARGIN-LEFT: 36pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Arial'"></SPAN></P>
<P style="MARGIN-TOP: 5pt; MARGIN-LEFT: 36pt"><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Arial'"></SPAN>&nbsp;</P>
<P><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Arial'"></SPAN>&nbsp;</P>
<P><SPAN style="FONT-SIZE: 11pt; FONT-FAMILY: 'Arial'"></SPAN>&nbsp;</P></DIV></BODY></HTML>