[FASTCGI] e: Apache 2.2.13 Server on Windows + FastCGI

Gordon Boorman Gordon.Boorman at microfocus.com
Wed Sep 2 10:40:14 EDT 2009


Hi,
You can see in the log that that mod_fastcgi is trying to start your
fcgi process but it is not starting. Why do you have an MFC header file
and a declspec import in your process code?
Why don't you start with one of the examples and then modify it after
you get things working?
I recommend you start with the c++ example and then modify it later if
you want to link in MFC code with it.
-Gordon Boorman

-----Original Message-----
From:
fastcgi-developers-bounces+gordon.boorman=microfocus.com at mailman.pins.ne
t
[mailto:fastcgi-developers-bounces+gordon.boorman=microfocus.com at mailman
.pins.net] On Behalf Of fastcgi-developers-request at mailman.pins.net
Sent: Wednesday, September 02, 2009 12:48 AM
To: fastcgi-developers at mailman.pins.net
Subject: FastCGI-developers Digest, Vol 14, Issue 1

Send FastCGI-developers mailing list submissions to
	fastcgi-developers at mailman.fastcgi.com

To subscribe or unsubscribe via the World Wide Web, visit
	http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers
or, via email, send a message with subject or body 'help' to
	fastcgi-developers-request at mailman.fastcgi.com

You can reach the person managing the list at
	fastcgi-developers-owner at mailman.fastcgi.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of FastCGI-developers digest..."


Today's Topics:

   1. Apache 2.2.13 Server on Windows + FastCGI
      (sauda.furkhana at wipro.com)
   2. Re: Apache 2.2.13 Server on Windows + FastCGI (Will Hawes)


----------------------------------------------------------------------

Message: 1
Date: Wed, 2 Sep 2009 11:18:09 +0530
From: <sauda.furkhana at wipro.com>
Subject: [FASTCGI] Apache 2.2.13 Server on Windows + FastCGI
To: <fastcgi-developers at mailman.fastcgi.com>
Message-ID:
	
<CBE0A8E1D067704EA75C8D910F98B93D0329F6E7 at HYD-MKD-MBX01.wipro.com>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

 

I have Apache 2.2.13 installed on Windows XP. It works on port 8080.
1) I have configured Apache to support FastCGI module
(mod_fastcgi-2.4.6-AP22.dll) as well, by downloading it from
http://fastcgi.com/dist. I have placed the module in "modules" directory
of Apache.
2) I have built a standalone FastCGI application "check.exe". This
required libfcgi.dll which I created using source files in .tar
(fcgi-2.4.0.tar.gz) provided at http://fastcgi.com/dist.
3) I placed the executable in cgi-bin folder.
4) Now when I access it using http://localhost:8080/cgi-bin/check
<http://localhost:8080/cgi-bin/check>  - I get "Internal Server Error".
Please see error.log attached here for more details.

Please reply what is going wrong!! I'm stuck up with this for quite a
long time by now!!! Any response to this will be of GREAT help!!!

Thanks in advance!

 

Here are the details:

===============

I) Apache configuration:

LoadModule fastcgi_module modules/mod_fastcgi.dll
<IfModule mod_fastcgi.c>
     <Directory /cgi-bin/>
        SetHandler fastcgi-script
        Options +ExecCGI
    </Directory>
    AddHandler fastcgi-script .exe
  </IfModule>

 

II) Code in the application:

#include "fcgi_stdio.h"
#include "fcgiapp.h"
#include <stdlib.h>
#include "stdafx.h"
extern "C" _declspec (dllimport) int FCGI_Accept(void);
int main(int argc, char* argv[])
{
               int count = 0;
               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"));
 
                               printf("Hello World!\n");
                               printf("Hello FCGI!\n");
                               printf("Hello ALEX!\n");
               }
               return 0;
}

 

III) Error.log in Apache:

[Wed Sep 02 10:30:29 2009] [notice] Apache/2.2.13 (Win32)
mod_fastcgi/2.4.6 configured -- resuming normal operations

[Wed Sep 02 10:30:29 2009] [notice] Server built: Aug  6 2009 15:50:50

[Wed Sep 02 10:30:29 2009] [notice] Parent: Created child process 2900

Apache server shutdown initiated...

Child 2900: Child process is running

[Wed Sep 02 10:30:29 2009] [notice] Child 2900: Acquired the start
mutex.

[Wed Sep 02 10:30:29 2009] [notice] Child 2900: Starting 64 worker
threads.

[Wed Sep 02 10:30:29 2009] [notice] FastCGI: process manager initialized

[Wed Sep 02 10:30:29 2009] [notice] Child 2900: Starting thread to
listen on port 8080.

[Wed Sep 02 10:30:36 2009] [warn] FastCGI: (dynamic) server "C:/Program
Files/Apache Software Foundation/Apache2.2/cgi-bin/check.exe" started
(pid 3968)

[Wed Sep 02 10:30:36 2009] [warn] FastCGI: (dynamic) server "C:/Program
Files/Apache Software Foundation/Apache2.2/cgi-bin/check.exe" (pid 3968)
terminated with exit with status '0'

[Wed Sep 02 10:30:41 2009] [warn] FastCGI: (dynamic) server "C:/Program
Files/Apache Software Foundation/Apache2.2/cgi-bin/check.exe" restarted
(pid 2592)

[Wed Sep 02 10:30:41 2009] [error] [client 127.0.0.1] (OS 109)The pipe
has been ended.  : FastCGI: comm with server "C:/Program Files/Apache
Software Foundation/Apache2.2/cgi-bin/check.exe" aborted:
GetOverlappedResult() failed

[Wed Sep 02 10:30:41 2009] [error] [client 127.0.0.1] FastCGI:
incomplete headers (0 bytes) received from server "C:/Program
Files/Apache Software Foundation/Apache2.2/cgi-bin/check.exe"

[Wed Sep 02 10:30:41 2009] [warn] FastCGI: (dynamic) server "C:/Program
Files/Apache Software Foundation/Apache2.2/cgi-bin/check.exe" (pid 2592)
terminated with exit with status '0'

[Wed Sep 02 10:30:46 2009] [warn] FastCGI: (dynamic) server "C:/Program
Files/Apache Software Foundation/Apache2.2/cgi-bin/check.exe" restarted
(pid 2496)

[Wed Sep 02 10:30:46 2009] [warn] FastCGI: (dynamic) server "C:/Program
Files/Apache Software Foundation/Apache2.2/cgi-bin/check.exe" (pid 2496)
terminated with exit with status '0'

[Wed Sep 02 10:30:51 2009] [warn] FastCGI: (dynamic) server "C:/Program
Files/Apache Software Foundation/Apache2.2/cgi-bin/check.exe" restarted
(pid 1344)

[Wed Sep 02 10:30:51 2009] [warn] FastCGI: (dynamic) server "C:/Program
Files/Apache Software Foundation/Apache2.2/cgi-bin/check.exe" (pid 1344)
terminated with exit with status '0'

[Wed Sep 02 10:30:56 2009] [warn] FastCGI: (dynamic) server "C:/Program
Files/Apache Software Foundation/Apache2.2/cgi-bin/check.exe" restarted
(pid 980)

[Wed Sep 02 10:30:56 2009] [warn] FastCGI: (dynamic) server "C:/Program
Files/Apache Software Foundation/Apache2.2/cgi-bin/check.exe" (pid 980)
terminated with exit with status '0'

[Wed Sep 02 10:31:01 2009] [warn] FastCGI: (dynamic) server "C:/Program
Files/Apache Software Foundation/Apache2.2/cgi-bin/check.exe" restarted
(pid 196)

[Wed Sep 02 10:31:01 2009] [warn] FastCGI: (dynamic) server "C:/Program
Files/Apache Software Foundation/Apache2.2/cgi-bin/check.exe" (pid 196)
terminated with exit with status '0'

[Wed Sep 02 10:31:02 2009] [notice] Parent: Received shutdown signal --
Shutting down the server.

[Wed Sep 02 10:31:02 2009] [notice] Child 2900: Exit event signaled.
Child process is ending.

[Wed Sep 02 10:31:03 2009] [notice] Child 2900: Released the start mutex

[Wed Sep 02 10:31:04 2009] [notice] Child 2900: All worker threads have
exited.

[Wed Sep 02 10:31:05 2009] [notice] Child 2900: Child process is exiting

[Wed Sep 02 10:31:05 2009] [notice] Parent: Child process exited
successfully.

 


Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email. 

www.wipro.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mailman.pins.net/mailman/private.cgi/fastcgi-developers/attachme
nts/20090902/89dad929/attachment-0001.html>

------------------------------

Message: 2
Date: Wed, 2 Sep 2009 08:47:38 +0100
From: Will Hawes <wdhawes at gmail.com>
Subject: Re: [FASTCGI] Apache 2.2.13 Server on Windows + FastCGI
To: fastcgi-developers at mailman.fastcgi.com
Message-ID:
	<360eac500909020047v2bee5323w8c67ac65295e2a6f at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

2009/9/2  <sauda.furkhana at wipro.com>:

> 1) I have configured Apache to support FastCGI module
> (mod_fastcgi-2.4.6-AP22.dll) as well, by downloading it
> from http://fastcgi.com/dist.

That version of the mod_fastcgi dll is known not to always play nicely
with Apache 2.2 on Windows.

Try this more recent one instead:

http://dev.catalyst.perl.org/wiki/deployment/apache_fastcgi_win32#Instal
l_Apache_FastCGI_module


------------------------------

_______________________________________________
FastCGI-developers mailing list
FastCGI-developers at mailman.fastcgi.com
http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers


End of FastCGI-developers Digest, Vol 14, Issue 1
*************************************************


This message has been scanned for viruses by MailController -
www.MailController.altohiway.com

Please consider the environment before printing this e-mail.



More information about the FastCGI-developers mailing list