In Delphi 10.1 Berlin, I create a web service (DLL file) and copy it to the host server in the home / public_html / cgi-bin directory but then I can’t run it. in the browser food:

http: //domain_name/cgi-bin/mod_ap.dll/wsdl

and in return I get

Your connection is not secure. The owner of (domain_name) has configured their website improperly. Firefox has not connected to this website.

if this file is added to exception then already displays:

lscgid: execve (): / home /.../ public_html / cgi-bin / mod_ap.dll: Exec format error

as read it may be from the incompatibility of operational systems. The file is created in delphi and the server has the operating system Centos (Linux) and the server litespeed (Linux). Should the file created in Delphi for windows run on linux? Why html and other files open on the server? Or something very confusing!

    1 answer 1

    This file should really be compiled for Linux. Under Linux, Delphi can only compile since version 10.2 (Tokyo)

    html files open because they are not executable files

    • Anton Shchyrov thanks for the reply. it turns out that datasnap will also not work on the server where linux is installed, since in the case of datasnap, also the executable exe must be published on the server. Do I understand you correctly? And the last question, what is the situation in Visual studio 2017 in the sense of compatibility do not know? - basti
    • one
      @basti Everywhere things are the same - the executable file, as well as dll / so must be compiled under the platform where they will be used. And then see the description of the compiler - whether it can compile under the target platform or not - Anton Shchyrov
    • Anton Shchyrov those applications that are located on servers where linux OS- a) are created in linux environment or b) are created in windows environment and then recompiled on compilers for linux? - basti
    • @basti No matter in which environment they are created. It is important how compiled. For example, the Delphi IDE is a 32 bit Windows application. But it can compile under Win32, Win64, iOS, Android, Linux - Anton Shchyrov
    • Anton Shchyrov is the last question and I will not bother again: there is a client program on Delphi floor Windows. Now I have to add a web-service program. The essence of the program is to send data from the client database to the server (xml-packages). But it turns out that the client part remains on the client and the server part (interface) after getting to Delphi is then recompiled again under Linux and downloaded to the server. The server part must be associated with the database Mysql and the server part will be inserted records in the database. Am I right? - basti