[Lazarus] fpWeb FCGI Setup

ABorka fpc-devel at aborka.com
Thu May 26 19:19:38 CEST 2011


On 5/26/2011 09:30, silvioprog wrote:
> Hi.
>
> I could never run a FastCGI module. :(
>
> My steps (without success):
>
> 1. Download and install lasted XAMPP;
> 2. Download "http://www.fastcgi.com/dist/mod_fastcgi-2.4.6-AP22.dll"
> em copy to "C:\xampp\apache\modules\mod_fastcgi-2.4.6-AP22.dll";
> 3. Edit the "C:\xampp\apache\conf\httpd.conf" to:
>    LoadModule rewrite_module modules/mod_rewrite.so
>    LoadModule fastcgi_module modules/mod_fastcgi-2.4.6-AP22.dll
>    <IfModule mod_fastcgi.c>
>      FastCGIConfig -autoUpdate -idle-timeout 120 -killInterval 3600
> -maxClassProcesses 3 -maxProcesses 15 -startDelay 30
>      AddHandler fastcgi-script .fcgi
>    </IfModule>
> 4. Restart Apache;
> 5. Create, compile and copy the my demo (in attached) to
> "C:\xampp\cgi-bin\test.fcgi";
> 6. Open in Firefox the link "http://localhost/cgi-bin/test.fcgi";
>
> And not works. When I open the link, Firefox freezes, as if the module
> was on infinity loop.
>
> How do I fix it?
>
> Thx.

Do not pull (all) your hair yet :)

I was testing FCGI with fpweb the past day or so on Windows, and it 
seems to be broken and only the FastCgiExternalServer way is working.
In fact, you are correct that there is an infinite loop, and that is 
Apache trying to start up the FCGI application continuously at startup, 
but it keeps exiting. You can see it in the apache error logs.

On Linux, everything works OK for both mod_fastcgi (sources from 
fastcgi.com/dist) and mod_fcgid that the Apache project develops.

For now, I suggest you use the FastCgiExternalServer way on Windows and 
specify a port in your FCGI app/Apache conf. You need to start the FCGI 
application before sending the requests to it though because this way 
Apache does not do it for you.
In any case, this is the best way to develop and debug an FCGI 
application anyway because you can just use breakpoints and the debug 
facilities from within Lazarus.

It will be fixed on Windows as soon as the problem is found, I am sure.
We are still trying to find the issue.

AB





More information about the Lazarus mailing list