Jump to content


Deploying as ISAPI - running Apache XAMPP

  • Please log in to reply
2 replies to this topic

#1 tcsh



  • Members
  • PipPip
  • 14 posts

Posted 13 March 2018 - 07:01 PM



First issue I'm having:


Deleted the following line from the project .dpr file:

{$define UNIGUI_VCL} // Comment out this line to turn this project into an ISAPI module

The .dpr now looks like this:

{$ifndef UNIGUI_VCL}

  ServerModule in 'ServerModule.pas' {UniServerModule: TUniGUIServerModule},
  MainModule in 'MainModule.pas' {UniMainModule: TUniGUIMainModule},
  u_main in 'u_main.pas' {MainForm: TUniForm},
  u_login in 'u_login.pas' {UniLoginForm1: TUniLoginForm},
  u_map in 'u_map.pas' {MapForm: TUniForm},
  u_pdf in 'u_pdf.pas' {pdfForm: TUniForm},
  u_feedback in 'u_feedback.pas' {feedbackForm: TUniForm},

{$R *.res}

{$ifndef UNIGUI_VCL}

{$ifdef UNIGUI_VCL}
  ReportMemoryLeaksOnShutdown := True;

In Rad Studio I've set Build Configurations to Release in the Project Manager


I compile then go to the \Release folder in my Project folder and there is no copsi.dll file - just copsi.exe

So it's not compiling and releasing as a .dll as dev manual says it should once I uncomment/delete that first line from the .dpr

And yes, I did select Standalone / ISAPI when initially creating the project from the wizzard.


What's going on?


My second problem:


Installed XAMPP, configured httpd.conf with all thats needed.


In httpd.conf:


LoadModule isapi_module modules/mod_isapi.so is uncommented (no #) in front.

AddHandler isapi-handler .dll - added to httpd.conf


Added this  to httpd.conf as per development manual instructions:



Renamed copsi.exe (read 1st problem) to copsi.dll - figured maybe it's just a bug and it spits it out with a different name but as a dll


Copied the file to C:\webapps


I start apache - opening up localhost in browser takes me to the apache dashboard (xampp/htdocs)

Opening localhost/webapps/ says not found

Opening localhost/webapps/copsi.dll says not found


Thats with the paths left set to default as they were (extjs and the rest)

I even copied all the folders (extjs and the rest) to C:\webapps and set the paths in ServerModule to .\[extjs] and so forth (all the rest)


Still same thing happens.


What am I doing wrong so far?


I'd like to deploy it as ISAPI and run it with XAMPP just to see it/how it works out of Standalone.


Let me know if I forgot to mention any info. Thanks!

  • 0

#2 delphidude


    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 193 posts
  • LocationNorway

Posted 15 March 2018 - 08:08 PM

1. Uncomment that top line, like it says

2. Close your project.

3. Open it again

4. Compile it

5. Find the DLL - it is there somewhere, do a search

6. Copy the DLL to the directory

7. Restart your apache server

8. Try now


You can also add


DirectoryIndex copsi.dll


after "Allow from all"-line, and then you need only specify the directory

when loading the app, like in your first "Opening" example.


Close and reopen your Delphi project when switching between

compiling/running as local exe and compiling a DLL, as you un/comment that top line,

to make sure the compiler does it right.


If still getting "not found" then check your apache DocumentRoot

and put a text file in the directory just to see if you are routed correctly.

  • 0

#3 tcsh



  • Members
  • PipPip
  • 14 posts

Posted 17 March 2018 - 11:26 AM

*** EDITED ***


Moved to IIS (installed it on my Windows 10) and managed to get it working.

Whole problem was I had to edit the handler mapping again (for isapi .dll) and specifically add the .dll in the executable field.

The tutorials don't cover that.


It's working now. Thanks delphidude 

  • 0

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users