edit: fixed. nevermind.
I thought 1.8 RC4 was broken but I was wrong. with 1.8 RC4, the FPC version is updated to 3.0.4 RC1, in which the fp-web package is updated to support routing.
to enable legacy routing to fix my stupid hello world FCGI applicaiton, add this to the main program.
Application.LegacyRouting:=true;
I am pretty new here, I am not sure how should I create a bug report so let me write things down here first. It would be great if you guys can point me to the right driection like, is it a freepascal bug? or is it a lazarus bug? Pointer to run time library setup would also be great. Maybe I can try to fix this bug myself.
Seems fpWEB's CGI and Fast CGI are broken in RC4, but they are fine in RC3. Just simple hello world CGIs. Apache give server errors.
edit:tested with RC4 clean install in VMWARE
windows 7 pro 64 bit
Lazarus 1.80 RC4 64bit
apache 2.4 64 bit, httpd-2.4.27-x64-vc14.zip and
mod_fcgid-2.3.9a-2.4.x-x64-vc14.zip from
https://www.apachehaus.net/I have weblaz, lazwebextra installed(plus zeos, lazreport).
create a new CGI project, add a action, set it to default, and add a onrequest handler.
begin
AResponse.Content:='hello cgi';
Handled:=true
end;
compile with RC3, it runs. all good.
recompile with RC4 in a VM, it gives
The application encountered the following error:
Error: Not found
Stack trace:
$00000001000381D1
$0000000100037AC4
$000000010003824D
$000000010002F9A8
$000000010003029F
$000000010002F31F
$000000010003063F
$00000001000353B5
$00000001000016C2 line 11 of hellocgi.lpr
$00000001000016D6
$000000010000F643
$0000000100010141
$00000000775259BD
$000000007765A2E1
similarly, with a fast cgi app running in lazarus debug mode, it gives exception class 'EHTTPRoute' with message:Not found at address 10003B7E1. Seems debugger is not able to locate the source.
and btw, I have been trying to test with apache module, but so far I am only able to get things working with apache 2.2 32bit.
my apache's conf is pretty clean except i setup my CGI path and FastCGI module
ScriptAlias /cgi-bin/ "C:/Checkout/testcgi/lib/x86_64-win64/"
LoadModule fastcgi_module "modules/mod_fastcgi.so"
<IfModule mod_fastcgi.c>
<Directory "C:/Checkout/testfcgi/lib/x86_64-win64">
#Order allow,deny
#Allow from all
Require all granted
</Directory>
FastCgiExternalServer "C:/Checkout/testfcgi/lib/x86_64-win64/testfcgi.exe" -host 127.0.0.1:9999 -idle-timeout 30 -flush
#FastCgiServer "C:/Checkout/testfcgi/lib/x86_64-win64/testfcgi.exe" -idle-timeout 30
ScriptAlias /testfcgi "C:/Checkout/testfcgi/lib/x86_64-win64/testfcgi.exe"
</IfModule>