Re: Help Required

"Michael Richards" <michael-97jfqw80gc4sA/[email protected]> Fri, 20 Jul 2012 16:20:22 +0000 (UTC)
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <66265845-fastmail@[74.59.249.155]>
--===============5480038939913427261==
Content-Type: text/html
Content-Transfer-Encoding: 7bit

<html><[email protected]><caf4s8fr3-3yutfzmen=vawgrqxhp=0pkncmfuizjkjgmsnvhwq-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>I think your program may be that you're writing to standard out rather than the CGI stream. For a C++ program,I use fastcgio.cpp.<br>Here is a snippet that might help...<br><br>&nbsp; FCGIX_cout=new fcgi_ostream();<br>&nbsp; FCGIX_cerr=new fcgi_ostream();<br>&nbsp; FCGIX_cin=new fcgi_istream();<br><br>&nbsp; FCGX_Request request; // here is our request structure<br><br>&nbsp; // get everything ready for the customers<br>&nbsp; FCGX_Init();<br><br>&nbsp; FCGX_InitRequest(&amp;request,0,0);<br><br>&nbsp; // the FastCGI loop<br>&nbsp; while ((requestnum&lt;MAXREQUESTS) &amp;&amp; ((isLocal) || (FCGX_Accept_r(&amp;request)&gt;=0))) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // attach cin cout and cerr to the
  FastCGI socket streams<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((fcgi_ostream *)FCGIX_cout)-&gt;attach(request.out); // now I know my pointer values for<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((fcgi_o
 stream *)FCGIX_cerr)-&gt;attach(request.err); // this request. attach to them<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((fcgi_istream *)FCGIX_cin)-&gt;attach(request.in);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // manually set the environment to the FastCGI provided one<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; environ=request.envp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt; "Content-type: text/html\n\n";<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt; "foobar";<br>&nbsp;&nbsp;&nbsp; }<br><br>-Michael<br><br><br>&gt; I downloaded httpd-2.4.2-win32-ssl_0.9.8.zip and mod_fcgid-2.3.7-win32<br>&gt; from the apache lounge.<br>&gt; <br>&gt; I have written small cpp program using fastcgi libraries (downloaded<br>&gt; and build with VC 10).<br>&gt; <br>&gt; I am trying to execute this script (cpp pro
 gram) and getting this<br>&gt; error.<br>&gt; <br>&gt; [Fri Jul 20 18:05:40.433347 2012] [fcgid:info] [pid 1040:tid 420]<br>&gt; mod_fcgid: server<br>&gt; BLRTCM013.misys.global.ad:D:/FastCG
 I/FastCGI/Debug/FastCGI.exe(1244)<br>&gt; started<br><br><br>-SNIP-<stdlib.h><http: mailman.fastcgi.com="" pipermail="" fastcgi-developers="" attachments="" 2<br=""></http:></stdlib.h></caf4s8fr3-3yutfzmen=vawgrqxhp=0pkncmfuizjkjgmsnvhwq-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org></[email protected]><br /><pre>_________________________________________________________________
    <a href="http://fastmail.ca/" target="_blank">http://fastmail.ca/</a> - Fast Secure Web Email for Canadians</pre></html>

--===============5480038939913427261==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
FastCGI-developers mailing list
FastCGI-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
http://mailman.fastcgi.com/mailman/listinfo/fastcgi-developers

--===============5480038939913427261==--