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> FCGIX_cout=new fcgi_ostream();<br> FCGIX_cerr=new fcgi_ostream();<br> FCGIX_cin=new fcgi_istream();<br><br> FCGX_Request request; // here is our request structure<br><br> // get everything ready for the customers<br> FCGX_Init();<br><br> FCGX_InitRequest(&request,0,0);<br><br> // the FastCGI loop<br> while ((requestnum<MAXREQUESTS) && ((isLocal) || (FCGX_Accept_r(&request)>=0))) {<br> // attach cin cout and cerr to the FastCGI socket streams<br> ((fcgi_ostream *)FCGIX_cout)->attach(request.out); // now I know my pointer values for<br> ((fcgi_o stream *)FCGIX_cerr)->attach(request.err); // this request. attach to them<br> ((fcgi_istream *)FCGIX_cin)->attach(request.in);<br> // manually set the environment to the FastCGI provided one<br> environ=request.envp;<br> cout << "Content-type: text/html\n\n";<br> cout << "foobar";<br> }<br><br>-Michael<br><br><br>> I downloaded httpd-2.4.2-win32-ssl_0.9.8.zip and mod_fcgid-2.3.7-win32<br>> from the apache lounge.<br>> <br>> I have written small cpp program using fastcgi libraries (downloaded<br>> and build with VC 10).<br>> <br>> I am trying to execute this script (cpp pro gram) and getting this<br>> error.<br>> <br>> [Fri Jul 20 18:05:40.433347 2012] [fcgid:info] [pid 1040:tid 420]<br>> mod_fcgid: server<br>> BLRTCM013.misys.global.ad:D:/FastCG I/FastCGI/Debug/FastCGI.exe(1244)<br>> 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==--