Page 2 of 2
Re: Installation of mod_harbour as module or fastcgi handler
Posted: Fri May 28, 2021 10:46 am
by Antonio Linares
Yes, when you need the fastest speed fastCGI + mod_harbour is the way to go
![Smile :-)](./images/smilies/icon_smile.gif)
many thanks for your great feedback!
Re: Installation of mod_harbour as module or fastcgi handler
Posted: Fri May 28, 2021 12:11 pm
by Otto
Dar Antonio,
Please be so kind as to explain the difference between the individual versions and where I can find the installation instructions.
Does fastcgi no longer need Apache? Can you use prgs?
Best regards,
Otto
Re: Installation of mod_harbour as module or fastcgi handler
Posted: Fri May 28, 2021 5:04 pm
by Antonio Linares
Dear Otto,
There is mod_harbour "standard" and the mod_harbour "fastCGI" versions. Both work with Apache and Microsoft IIS.
Each one has its pros and its cons:
* mod_harbour "fastCGI" is very fast but it uses only ONE virtual machine for ALL requests. It is built using "multi-threading"
so it can attend lots of customers but they ALL share the workareas, the public variables, the global symbol table, etc. This
can be very "weak" for security reasons and messy to be properly coded:
http://harbourlanguage.blogspot.com/2010/04/harbour-multi-thread.html* mod_harbour "standard" uses ONE virtual machine for EACH request. You use Harbour standard code without having to worry
about the "multi-threading" difficulties. So you never share a virtual machine with anybody. libharbour.dll is copied
on each request. The penalty for this is around 100 ms but its design is very safe.
Re: Installation of mod_harbour as module or fastcgi handler
Posted: Sun May 30, 2021 7:14 am
by Massimo Linossi
Hi Antonio.
Can you better explain what kind of problems can arise with FastCgi ?
We started to use it because with the standard one we had a lot of problems with Apache on the server.
With lot of users (sometimes more than 50) that are using an Ads connection with several tables open
Apache was stopping and the only thing you can do i to restart it. Two times we must reboot the server
because was not responding. With Fastcgi all these kind of problems disappear.
The only thing that is not working with Fastcgi are the ole calls and the connection with Excel that is giving error
with some commands.
Thanks a lot for your great work.
Massimo
Re: Installation of mod_harbour as module or fastcgi handler
Posted: Sun May 30, 2021 8:49 am
by Antonio Linares
Dear Massimo,
You have nothing to worry about. If it is working fine for you, then its ok
![Smile :-)](./images/smilies/icon_smile.gif)
The web is "multi-threading" in the sense that several customers may do a request in the same moment, thus mod_harbour is built using multi-threading mode. You can check it running this: ? hb_mtvm(). You get .T. which means that multi-threading mode of Harbour is enabled.
fastCGI design requires a mod_harbour as an EXE. So this is a multi-threading EXE that will attend to all requests. Harbour coding for multi-threads requires some rules:
* if you need a static variable that it is NOT shared between threads then you have to use "THREAD static name"
* You have to "require" a workarea if it is being used from another thread ( dbRequest() / dbRelease() )
* You can use mutexes to temporarly stop other threads
* if a thread crashes it may block the other threads meanwhile the failing thread does not ends (mod_harbour kills it in 15 secs)
Harbour provides several MT examples to review:
https://github.com/harbour/core/tree/master/tests/mtFull docs for Harbour multi-threading:
https://github.com/Petewg/harbour-core/wiki/MultiThreading
Re: Installation of mod_harbour as module or fastcgi handler
Posted: Mon May 31, 2021 9:31 am
by Massimo Linossi
Hi Antonio.
I'm making some tests with IIS and i have some problem
This is the content of the folder
Code: Select all | Expand
Directory of c:\ModHarbour
31/05/2021 11:25 <DIR> .
31/05/2021 11:25 <DIR> ..
23/06/2015 08:00 1.757.136 ace64.dll
23/06/2015 08:21 2.418.640 adsloc64.dll
23/06/2015 07:44 2.394 adslocal.cfg
23/06/2015 07:57 2.696.656 aicu64.dll
23/06/2015 07:57 256.976 axcws64.dll
31/05/2021 09:46 3.405.824 libcrypto-1_1-x64.dll
31/05/2021 09:46 1.102.968 libcurl-x64.dll
31/05/2021 09:46 6.807.040 libharbour.dll
31/05/2021 09:46 681.472 libssl-1_1-x64.dll
31/05/2021 09:46 49.152 mod_harbour.dll
31/05/2021 11:19 <DIR> samples
This is the test prg
Code: Select all | Expand
#include "c:\include\ads.ch"
Static Ads_Handle
*************************************************
Function Main()
Setting_db()
IF !Connetti_db(@Ads_Handle,2)
Return nil
ENDIF
USE UTENTI ALIAS UTENTI SHARED NEW
SET ORDER TO TAG CODICE
Dbgotop()
Seek str(73,4) + str(240,6)
IF Found()
? UTENTI->UTENTE
ENDIF
Dbcloseall()
AdsDisconnect(Ads_Handle)
AdsApplicationExit()
Return nil
**************************************************************************
Function Connetti_db(Ads_Handle)
local str_conn:="" , lGo:=.F.
str_conn:="\\DBMASTER:8132\C$\DATABASE\DATABASE.ADD"
IF AdsConnect60(str_conn, 7,"user" , "PassWord",,@Ads_Handle)
lGo:=.T.
ENDIF
Return lGo
*********************
Function Setting_db()
REQUEST HB_LANG_IT
HB_LANGSELECT("IT")
REQUEST DBFCDX
REQUEST DBFFPT
REQUEST ADS
RddRegister( "ADS", 1 )
RddSetDefault("ADS")
SET SERVER REMOTE
SET FILETYPE TO ADT
SET(_SET_AUTORDER,1)
SET AUTOPEN ON
set(_SET_OPTIMIZE,.T.)
ADSLOCKING(.T.)
SET DATE BRITISH
SET DELETED ON
SET CENTURY ON
Return nil
And this is the error
Code: Select all | Expand
Error: Unknown or unregistered symbol
operation: ADSDISCONNECT
called from: HB_HRBLOAD, line: 0
called from: ..\source\exec.prg, EXECUTE, line: 70
Source:
Re: Installation of mod_harbour as module or fastcgi handler
Posted: Mon May 31, 2021 10:48 am
by Antonio Linares
Re: Installation of mod_harbour as module or fastcgi handler
Posted: Wed Jun 02, 2021 8:24 am
by Massimo Linossi
Hi Antonio,
can you give me all the instructions for installing this modharbour version on IIS ?
Thanks
Massimo
Re: Installation of mod_harbour as module or fastcgi handler
Posted: Wed Jun 02, 2021 2:19 pm
by Antonio Linares
Re: Installation of mod_harbour as module or fastcgi handler
Posted: Sat Jun 19, 2021 3:13 pm
by ricardog
![Question :?:](./images/smilies/icon_question.gif)
Antonio, Charly pueden indicarme en donde puedo obtener información para trabajar con MODHARBOUR en HOSTGATOR ? Instalarlo en mi dominio.
Ó si me pueden apoyar para trabajar con ese proveedor de hosting?
Saludos y muchas gracias
Re: Installation of mod_harbour as module or fastcgi handler
Posted: Mon Jun 21, 2021 7:36 am
by Antonio Linares
Ricardo,
Necesitas tener un servidor dedicado. No puedes instalarlo en uno que sea compartido y no dedicado.
Re: Installation of mod_harbour as module or fastcgi handler
Posted: Mon Jun 21, 2021 10:35 am
by Otto
Ricardo,
Why not xBhosts.com from FiveTech?
https://mybergland.com/fwforum/xbhosts.mp4Best regards,
Otto
Re: Installation of mod_harbour as module or fastcgi handler
Posted: Mon Jun 21, 2021 6:03 pm
by ricardog
Muchisimas gracias Antonio, Otto, veré con mas detenimiento el servicio que Otto me sugiere.
De nuevo muchas gracias.
![Very Happy :D](./images/smilies/icon_biggrin.gif)