Help Required

rajan singh <[email protected]> Fri, 20 Jul 2012 19:42:57 +0530
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <CAF4S8FR3-3yuTFZMeN=VawGRqXHp=0pkNCMFUiZJKjGMsnvHwQ@mail.gmail.com>
--===============7399873181472912978==
Content-Type: multipart/alternative; boundary=14dae9cfc13033a2c704c5437e6e

--14dae9cfc13033a2c704c5437e6e
Content-Type: text/plain; charset=ISO-8859-1

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>

--14dae9cfc13033a2c704c5437e6e
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<p class=3D"MsoNormal"><font color=3D"navy" face=3D"Arial"><span style=3D"c=
olor:navy;font-family:Arial;font-size:10pt">I downloaded=20
httpd-2.4.2-win32-ssl_0.9.8.zip and mod_fcgid-2.3.7-win32 from the apache=
=20
lounge.</span></font></p>
<p class=3D"MsoNormal"><font color=3D"navy" face=3D"Arial"><span style=3D"c=
olor:navy;font-family:Arial;font-size:10pt"> </span></font></p>
<p class=3D"MsoNormal"><font color=3D"navy" face=3D"Arial"><span style=3D"c=
olor:navy;font-family:Arial;font-size:10pt">I have written small=20
cpp program using fastcgi libraries (downloaded and build with VC=20
10).</span></font></p>
<p class=3D"MsoNormal"><font color=3D"navy" face=3D"Arial"><span style=3D"c=
olor:navy;font-family:Arial;font-size:10pt"> </span></font></p>
<p class=3D"MsoNormal"><font color=3D"navy" face=3D"Arial"><span style=3D"c=
olor:navy;font-family:Arial;font-size:10pt">I am trying to execute=20
this script (cpp program) and getting this error.</span></font></p>
<p class=3D"MsoNormal"><font color=3D"navy" face=3D"Arial"><span style=3D"c=
olor:navy;font-family:Arial;font-size:10pt"> </span></font></p>
<p class=3D"MsoNormal"><font color=3D"navy" face=3D"Arial"><span style=3D"c=
olor:navy;font-family:Arial;font-size:10pt">[Fri Jul 20=20
18:05:40.433347 2012] [fcgid:info] [pid 1040:tid 420] mod_fcgid: server=20
BLRTCM013.misys.global.ad:D:/FastCGI/FastCGI/Debug/FastCGI.exe(1244)=20
started</span></font></p>
<p class=3D"MsoNormal"><font color=3D"navy" face=3D"Arial"><span style=3D"c=
olor:navy;font-family:Arial;font-size:10pt">[Fri Jul 20=20
18:05:40.512355 2012] [fcgid:warn] [pid 1040:tid 944<b><span style=3D"font-=
weight:bold">] (OS 109)The pipe has been ended.  : [client=20
::1:49624] mod_fcgid: get overlap result=20
error</span></b></span></font></p>
<p class=3D"MsoNormal"><font color=3D"navy" face=3D"Arial"><span style=3D"c=
olor:navy;font-family:Arial;font-size:10pt">[Fri Jul 20=20
18:05:40.512355 2012] [core:error] [pid 1040:tid 944] [client ::1:49624] En=
d of=20
script output before headers: FastCGI.exe</span></font></p>
<p class=3D"MsoNormal"><font color=3D"navy" face=3D"Arial"><span style=3D"c=
olor:navy;font-family:Arial;font-size:10pt">[Fri Jul 20=20
18:05:44.636768 2012] [fcgid:info] [pid 1040:tid 420] mod_fcgid: process=20
D:/FastCGI/FastCGI/Debug/FastCGI.exe(1244) exit(communication error), retur=
n=20
code 255</span></font></p>
<p class=3D"MsoNormal"><font color=3D"navy" face=3D"Arial"><span style=3D"c=
olor:navy;font-family:Arial;font-size:10pt"> </span></font></p>
<div class=3D"MsoNormal"><font color=3D"navy" face=3D"Arial"><span style=3D=
"color:navy;font-family:Arial;font-size:10pt">Mine is windows 7 32=20
bit m/c. I can execute this cpp program separately.</span></font></div><div=
 class=3D"MsoNormal"><font color=3D"navy" face=3D"Arial"><span style=3D"col=
or:navy;font-family:Arial;font-size:10pt"></span></font>=A0</div><div class=
=3D"MsoNormal">
<font color=3D"navy" face=3D"Arial"><span style=3D"color:navy;font-family:A=
rial;font-size:10pt">cpp file:</span></font></div><div class=3D"MsoNormal">=
<font color=3D"navy" face=3D"Arial"><span style=3D"color:navy;font-family:A=
rial;font-size:10pt"></span></font>=A0</div>
<div class=3D"MsoNormal"><font color=3D"navy" face=3D"Arial"><span style=3D=
"color:navy;font-family:Arial;font-size:10pt"></span></font>=A0#include &qu=
ot;fcgi_stdio.h&quot; /* fcgi library; put it first*/<br>#include &lt;stdli=
b.h&gt;</div>
<div class=3D"MsoNormal">int count;</div><div class=3D"MsoNormal">void init=
ialize(void)<br>{<br>=A0 count=3D0;<br>}</div><div class=3D"MsoNormal">void=
 main(void)<br>{<br>/* Initialization. */=A0 <br>=A0 initialize();</div><di=
v class=3D"MsoNormal">
/* Response loop. */<br>=A0 while (FCGI_Accept() &gt;=3D 0)=A0=A0 {<br>=A0=
=A0=A0 printf(&quot;Content-type: text/html\r\n&quot;<br>=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0 &quot;\r\n&quot;<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &quot;&lt;t=
itle&gt;FastCGI Hello! (C, fcgi_stdio library)&lt;/title&gt;&quot;<br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &quot;&lt;h1&gt;FastCGI Hello! (C, fcgi_stdi=
o library)&lt;/h1&gt;&quot;<br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 &quot;Request=
 number %d running on host &lt;i&gt;%s&lt;/i&gt;\n&quot;,<br>=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0 ++count, getenv(&quot;SERVER_HOSTNAME&quot;));<br>
=A0 }<br>}</div><div class=3D"MsoNormal">=A0</div><div class=3D"MsoNormal">=
httpd.conf:</div><div class=3D"MsoNormal">&lt;Directory &quot;D:/FastCGI/Fa=
stCGI/Debug&quot;&gt;<br>Options All<br>AllowOverride All<br>Require all gr=
anted<br>
&lt;/Directory&gt;</div><div class=3D"MsoNormal">LoadModule fcgid_module mo=
dules/mod_fcgid.so</div><div class=3D"MsoNormal">&lt;IfModule mod_fcgid.c&g=
t;<br>=A0 &lt;Directory &quot;D:/FastCGI/FastCGI/Debug&quot;&gt;<br>=A0=A0 =
SetHandler fcgid-script<br>
=A0=A0=A0 Order allow,deny<br>=A0=A0=A0 Allow from all<br>=A0 &lt;/Director=
y&gt;<br>=A0 IPCConnectTimeout 10<br>=A0 IPCCommTimeout 20<br>=A0 OutputBuf=
ferSize 0<br>=A0 MaxRequestsPerProcess 500<br>=A0 ScriptAlias /myfcgid &quo=
t;D:/FastCGI/FastCGI/Debug/FastCGI.exe&quot;<br>
=A0 #ScriptAlias /fcgilist &quot;D:/FastCGI/FastCGI/Debug/FastCGI.exe&quot;=
<br>&lt;/IfModule&gt;</div>

--14dae9cfc13033a2c704c5437e6e--

--===============7399873181472912978==
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

--===============7399873181472912978==--