Jump to content

hsvandrew

Members
  • Content Count

    16
  • Joined

  • Last visited

Community Reputation

3 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. hsvandrew

    Linux + Delphi + Apache problem on 10.3

    @Cristian Peța From what I can see ICU is available (IsICUAvailable returns true) As many Delphi developers we have a knowledge base of all the quirks on Windows. I feel this is going to be a learning experience to discover the quirks of Linux. This to me is a dangerous issue that needs to be understood because it could have all sorts of unintended and very hard to track down bugs, especially when the problem disappears as soon as you run it on Windows or Linux console. I suspect the same problem will be affecting many string handling functions and probably other functions as well.
  2. hsvandrew

    How to develop cheaply for iOS?

    You simply need the hosting provider to allow you to VPN to the cloud network running the Mac. However, if you want to make a good iOS app you'll need to do your testing on a real device: you just can't get the 'feel' of an app without touching it. If you want to develop cheaply for iOS you would be using Xcode + HTML + JS or similar. As you've already paid a huge amount of money for Delphi, a Mac should be somewhat affordable.
  3. hsvandrew

    Linux + Delphi + Apache problem on 10.3

    This issue has now been updated to show the offending function. Under the operating environment above, the result of this code is -1 Does anyone know why this might happen? procedure TWebModule1.WebModule1DefaultHandlerAction(Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); begin response.contentType := 'text/plain'; response.content := 'AnsiCompareText(''PARAMname'',''paramNAME'') ) = ' + inttostr(AnsiCompareText('PARAMname','paramNAME')); end;
  4. hsvandrew

    ISAPI in Delphi 10.2,10.3 TranslateURI

    Apologies @Andrea Magni I wasn't able to edit the survey once it collected results and I wasn't aware of the MARS REST Library
  5. I'm not sure that I agree with this comment. Any memory based storage i.e. SSD, Memory Sticks etc can perform multiple operations at the same time. There is no head to move and multiple parts can be written or changed at the same time. So yes, using a thread would be very helpful. You should create a queue (pool) that receives files to delete, and another process that scans directories. This way you won't need to wait before the directory scan is done to start removing things. You may even want to consider the low level features Everything by Voidtools uses to get the directory structures/file structures faster than FindFirst.
  6. hsvandrew

    Delphi, be better!

    Rio contains more new bugs than the 496 'fixed' ones and seems to be one of the lowest quality builds I've seen in a while. It was rushed out the door without being close to ready. We've all been there. Boss says it needs to be ready by Nov 28th. So we release it. The really bad part about Rio is that 2 months on, almost all the bugs remain unfixed and look like things we will have to live with forever. Some of the most annoying in Rio are: The Library Path's don't save properly much of the time (not sure if you have to close rather than open a new project but its very annoying) Code insight doesn't work for the new inline variable feature despite this being a huge new feature Code completion still can't cope with anon methods and adds annoying end's to your code everytime you press enter None of the new dialogs support wheel scrolling anymore The ugly white lines around the search boxes in the title bar! Critical bugs in the ISAPI web broker libraries New IDE performance is slower because of the skins, especially to open dialogs (it can be turned off, but I don't buy a car with great styling to then cover with a car cover when driving) Mac 64bit pushed forward yet again, despite the 64bit store requirement If they wanted to make Rio friendly to new developers they should have copied the look from the welcome page in office 2019 it looks great. The ugly web page welcome of Delphi is not very pleasing.
  7. We are having a problem with a devart control which may in the end be something funny they did wrong but the behaviour seems strange and more like a low level issue. Basically, the standard SQL Query control contains a simple SQL statement i.e. thisQuery.SQL.text := 'select * from emp where job = :PARAMname'; thisQuery.ParamByName('paramNAME').asString := 'new'; thisQuery.open; On Windows VCL, console etc and on Linux as a console app this works as expected (param is case insensitive as expected) When the exact same code is compiled into a generic brand new Delphi Apache Module and ran on the exact same machine as the console test app, the query fails unless the param is the same case in the SQL statement as it is in the ParamByName function. This seems strange to me. Does anyone know of any kind of Linux operating system quirk where the host application could override a function in such a way that you might expect this type of behaviour?
  8. hsvandrew

    ISAPI in Delphi 10.2,10.3 TranslateURI

    Returns a blank string, yes logged https://quality.embarcadero.com/browse/RSP-17838
  9. This note is for anyone going about creating an ISAPI in modern versions of Delphi. Request.TranslateURI has been broken (and still remains unfixed in 10.3)for a number of releases. TranslateURI is useful if you run multiple sites on the same IIS server and want to work out the base folder of the site i.e. request.TranslateURI('/') to work out which customer experience/domain etc you are currently serving. I'm not sure if this code covers every unicode etc scenario, but for basic needs it works whereas the built in code does not. You'll need to modify C:\Program Files (x86)\Embarcadero\Studio\20.0\source\internet\Web.Win.IsapiHTTP.pas You need to then ADD the Web.Win.IsapiHTTP.pas to your project with the full source path I'm surprised this bug hasn't had more attention and have to wonder how much web work is going on in Delphi. **please see below for updated version from another member** function TISAPIRequest.TranslateURI(const URI: string): string; var PathBuffer: array[0..1023] of AnsiChar; Size: Integer; begin System.AnsiStrings.StrCopy(PathBuffer, PAnsiChar(AnsiString(URI))); Size := SizeOf(PathBuffer); if ECB.ServerSupportFunction(ECB.ConnID, HSE_REQ_MAP_URL_TO_PATH, @PathBuffer, @Size, nil) then Result := string(PathBuffer) else Result := ''; end;
  10. I'm hoping this post helps future users creating Apache modules for Linux I'm not really sure why, but it was not possible to do anything time consuming in the '.dpr' section of the project for the Apache module. I'm not sure if perhaps apache starts the module up first under root then moves it to the user workers later. In our Windows ISAPI extension we started a startup thread from the DPR before application.run. Under Apache it seems to shutdown the thread started from the main process after a few seconds. We had to move our INIT code into TWebModule1.WebModuleCreate(Sender: TObject); and use a critical section to ensure it wasn't created multiple times. Obviously if anyone knows why, feel free to post. As an example, our startup code connects to a few socket servers to get some startup settings. We could not figure out why the code was getting part way through and just blocking and never receiving the socket response from the working server (after a few seconds/milliseconds) so the first few requests would work then stop. Once the code was moved as above all was fine again.
  11. Hi everyone, Just wondering if anyone has any experience with Delphi 10.2.3/10.3 Apache Modules on Linux request.GetFieldByName('Accept-Language') returns a valid value request.GetFieldByName('HTTPS') is blank, whilst running on a HTTPS connection We aren’t running any load balances and apache IS serving HTTPS content with SNI correctly I’ve even adding to the virtual hosts SetEnv HTTPS on https://serverfault.com/questions/446294/https-variable-in-server-using-nginx-as-reverse-proxy Any ideas? Delphi Rio 10.3 Apache Config <VirtualHost *:443> SetEnv HTTPS on ServerName the.domain.com DocumentRoot /var/www/html SSLEngine on SSLCertificateFile /……(correct file) SSLCertificateKeyFile /…….(correct file) SSLCertificateChainFile /…..(correct file) </VirtualHost>
  12. Hi all, using Delphi 10.2.3 AND Delphi 10.3, the following ISAPI (with no other code, built straight from a new project) crashes the entire ISAPI work queue. I've attached a html test file that causes the crash. It appears like if you have simultaneous ReadTotalContent's running at the same time things lock. Can anyone else reproduce this or suggest why? Please test with IIS 10 or newer. Our test system is Windows Server 2016. TWebModule1.WebModule1DefaultHandlerAction(Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); var fileOut: TFileStream; begin try handled := true; Request.ReadTotalContent;//This freezes everything (ecb.ReadClient) fileOut := TFileStream.Create('C:\temp\files\'+ request.PathInfo.Replace('_upload2/','')+'_'+ request.QueryFields.Values['chunk']+'.txt',fmCreate); fileOut.Write(Request.RawContent,length(Request.RawContent)); FreeAndNil( fileOut ); except end; end; test.html
  13. hsvandrew

    Web dashboard application

    We've spent 2 years working on making a full commerical ERP solution powered by Delphi delivered over the web. Although a framework like Intraweb, UniGUI etc might be fast and easy and do the job, I actually would encourage you to learn a little HTML, CSS & Javascript yourself. You can use the TidHTTPServer component in Delphi to talk in HTTP/HTTPS. You might start by writing code in the default action to read a URL and turn it into a local file i.e. replace / with \ etc and don't allow any ..\ etc. This would allow you to stream a HTML5 page, a CSS file and a javascript file. After you've got this going, Review DevExpress HTML5 Library and learn how to use your new HTTP Server to send the browser JSON data streams. It might take you a few days to get up to speed with how to make a basic HTML5 page, learn CSS, Javascript etc and how to make Delphi output JSON via Indy but once you learn these skills you'll be in full control of your future look & feel. Obviously if your app gets more complex you'll have to work out how to create a session cookie & keep authentication records in your app.
  14. hsvandrew

    Changes in Parallel Library

    I'm going to pause this rant for now, perhaps these issues have been resolved and its just the tickets in quality control haven't been closed. We spend a lot of time on this in January and it failed miserably (especially for Linux) so we gave up. It appears it might be ok now on 10.2.3/10.3 I will do some more testing and advise
  15. hsvandrew

    Changes in Parallel Library

    Ok I'm prepared to concede this problem isn't happening anymore on 10.2.3 (some of these results came from earlier in 2018) - it is possible this is a linux only problem as that was the platform where this issue was experienced
×