[Lazarus] fp-Web and FastCGI
Michael Van Canneyt
michael at freepascal.org
Sun Oct 10 20:51:39 CEST 2010
On Sun, 10 Oct 2010, Leonardo M. Ramé wrote:
> On 2010-10-10 13:34:30 -0300, Leonardo M. Ramé wrote:
>>
>> exception at 0000000000466EEA:
>> Failed to open input-handle passed from server. Socket Error: 88.
>>
>> Now I'm stuck, somebody can help me with this?.
>>
>
> I figured out that I was configuring wrongly my apache2. Instead of
> using FastCgiExternalServer I changed it for this:
>
>
> FastCgiServer /var/www/fcgi-bin/myfastcgiapp.fcgi -idle-timeout 3
>
> Also, I was using a symbolic link to
> /var/www/fcgi-bin/myfastcgiapp.fcgi, and now I just copied my app to
> that directory.
>
> Then, I restarted apache2, and went to
> http://localhost/fcgi-bin/myfastcgiapp.fcgi and, got a *more friendly*
> response.
>
> I removed my TFPWebModule actions, and added just this global request
> handler:
>
> procedure TFPWebModule1.DataModuleRequest(Sender: TObject; ARequest:
> TRequest;
> AResponse: TResponse; var Handled: Boolean);
> begin
> AResponse.Content := 'Hello World!';
You're missing
AResponse.SendResponse;
Handled is supposed to be set only after the response has been sent.
CGI additionally checks if content was sent, but fastcgi not.
Maybe we should add this check to FastCGI.
Michael.
More information about the Lazarus
mailing list