Petzy Posted March 13, 2018 Share Posted March 13, 2018 Hi, 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} library {$else} program {$endif} COPSI; uses uniGUIISAPI, Forms, 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} exports GetExtensionVersion, HttpExtensionProc, TerminateExtension; {$endif} begin {$ifdef UNIGUI_VCL} ReportMemoryLeaksOnShutdown := True; Application.Initialize; TUniServerModule.Create(Application); Application.Run; {$endif} end. 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! Link to comment Share on other sites More sharing options...
Ron Posted March 15, 2018 Share Posted March 15, 2018 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. Link to comment Share on other sites More sharing options...
Petzy Posted March 17, 2018 Author Share Posted March 17, 2018 *** 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 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now