[FASTCGI] Help Required

rajan singh rajansin at gmail.com
Fri Jul 20 10:12:57 EDT 2012


I downloaded httpd-2.4.2-win32-ssl_0.9.8.zip and mod_fcgid-2.3.7-win32 from
the apache lounge.

 I have written small cpp program using fastcgi libraries (downloaded and
build with VC 10).

 I am trying to execute this script (cpp program) and getting this error.

 [Fri Jul 20 18:05:40.433347 2012] [fcgid:info] [pid 1040:tid 420]
mod_fcgid: server
BLRTCM013.misys.global.ad:D:/FastCGI/FastCGI/Debug/FastCGI.exe(1244)
started

[Fri Jul 20 18:05:40.512355 2012] [fcgid:warn] [pid 1040:tid 944*] (OS
109)The pipe has been ended. : [client ::1:49624] mod_fcgid: get overlap
result error*

[Fri Jul 20 18:05:40.512355 2012] [core:error] [pid 1040:tid 944] [client
::1:49624] End of script output before headers: FastCGI.exe

[Fri Jul 20 18:05:44.636768 2012] [fcgid:info] [pid 1040:tid 420]
mod_fcgid: process D:/FastCGI/FastCGI/Debug/FastCGI.exe(1244)
exit(communication error), return code 255

 Mine is windows 7 32 bit m/c. I can execute this cpp program separately.

cpp file:

 #include "fcgi_stdio.h" /* fcgi library; put it first*/
#include <stdlib.h>
int count;
void initialize(void)
{
  count=0;
}
void main(void)
{
/* Initialization. */
  initialize();
/* Response loop. */
  while (FCGI_Accept() >= 0)   {
    printf("Content-type: text/html\r\n"
           "\r\n"
           "<title>FastCGI Hello! (C, fcgi_stdio library)</title>"
           "<h1>FastCGI Hello! (C, fcgi_stdio library)</h1>"
           "Request number %d running on host <i>%s</i>\n",
            ++count, getenv("SERVER_HOSTNAME"));
  }
}

httpd.conf:
<Directory "D:/FastCGI/FastCGI/Debug">
Options All
AllowOverride All
Require all granted
</Directory>
LoadModule fcgid_module modules/mod_fcgid.so
<IfModule mod_fcgid.c>
  <Directory "D:/FastCGI/FastCGI/Debug">
   SetHandler fcgid-script
    Order allow,deny
    Allow from all
  </Directory>
  IPCConnectTimeout 10
  IPCCommTimeout 20
  OutputBufferSize 0
  MaxRequestsPerProcess 500
  ScriptAlias /myfcgid "D:/FastCGI/FastCGI/Debug/FastCGI.exe"
  #ScriptAlias /fcgilist "D:/FastCGI/FastCGI/Debug/FastCGI.exe"
</IfModule>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.fastcgi.com/pipermail/fastcgi-developers/attachments/20120720/15fbbfd8/attachment.html>


More information about the FastCGI-developers mailing list