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:

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

  1. Wagner Landgraf I said nothing about casting. I said to pass a typed constant.

    ReplyDelete
  2. David Heffernan Is there a practical difference? Nevertheless, casting, typed constant, typed variable, all fail if it's double or extended types involved. You mean "const Number: double = 3.14", right?

    ReplyDelete
  3. Without full sight of your code it is hard to say, but that const declaration is what I had in mind. If that fails then I am surprised. Still, we know that Emba have completely screwed up the floating point support in this Linux compiler. So expect anything to happen.

    ReplyDelete

Post a Comment