FloatToStr (*) doesn't seem to be working in Apache module on Linux?

FloatToStr (*) doesn't seem to be working in Apache module on Linux? From an empty Apache module created by Delphi wizard (File, New, Other, Delphi Projects, WebBroker, Web Server Application, Check "Linux", Next, Check "Apache dynamic link module", Next, Finish), replace the WebModule1DefaultHandlerAction event handler to return a simple string like this:

procedure TWebModule1.WebModule1DefaultHandlerAction(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled: Boolean);
begin
Response.Content := FloatToStr(3.14);
end;

Then build and manage to deploy and run that Apache module on Linux (**), that will simply crash with a Invalid Floating Pointer Operation error. I'm about to create a QP, just wanted to believe and be 100% sure this is happening.

(*) Looks like a problem with TFormatSettings, can't be 100% sure. But StrToFloat also doesn't seem to work, didn't bother to test other conversion functions.

(**) Some links to help: https://www.youtube.com/watch?v=z0nNRNQSxKI and http://blog.marcocantu.com/blog/2017-march-delphi-linux-database-web.html

Comments