Installation of mod_harbour as module or fastcgi handler

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!

Re: Installation of mod_harbour as module or fastcgi handler

Postby Antonio Linares » Fri May 28, 2021 10:46 am

Yes, when you need the fastest speed fastCGI + mod_harbour is the way to go :-)

many thanks for your great feedback!
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Installation of mod_harbour as module or fastcgi handler

Postby Otto » Fri May 28, 2021 12:11 pm

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: Installation of mod_harbour as module or fastcgi handler

Postby Antonio Linares » Fri May 28, 2021 5:04 pm

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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Installation of mod_harbour as module or fastcgi handler

Postby Massimo Linossi » Sun May 30, 2021 7:14 am

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
User avatar
Massimo Linossi
 
Posts: 495
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Installation of mod_harbour as module or fastcgi handler

Postby Antonio Linares » Sun May 30, 2021 8:49 am

Dear Massimo,

You have nothing to worry about. If it is working fine for you, then its ok :-)

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/mt
Full docs for Harbour multi-threading:
https://github.com/Petewg/harbour-core/wiki/MultiThreading
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Installation of mod_harbour as module or fastcgi handler

Postby Massimo Linossi » Mon May 31, 2021 9:31 am

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 view

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 view

#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 view

Error: Unknown or unregistered symbol
operation: ADSDISCONNECT
called from: HB_HRBLOAD, line: 0
called from: ..\source\exec.prg, EXECUTE, line: 70
Source:
 
User avatar
Massimo Linossi
 
Posts: 495
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Installation of mod_harbour as module or fastcgi handler

Postby Antonio Linares » Mon May 31, 2021 10:48 am

Dear Massimo,

Please use this modharbour.exe for IIS with ADS and fastCGI:

https://github.com/FiveTechSoft/mod_harbour/blob/master/fastcgi/windows/IIS/ADS/modharbour.exe
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Installation of mod_harbour as module or fastcgi handler

Postby Massimo Linossi » Wed Jun 02, 2021 8:24 am

Hi Antonio,
can you give me all the instructions for installing this modharbour version on IIS ?
Thanks
Massimo
User avatar
Massimo Linossi
 
Posts: 495
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Installation of mod_harbour as module or fastcgi handler

Postby Antonio Linares » Wed Jun 02, 2021 2:19 pm

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Installation of mod_harbour as module or fastcgi handler

Postby ricardog » Sat Jun 19, 2021 3:13 pm

:?: 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
ricardog
 
Posts: 158
Joined: Tue Oct 11, 2005 3:10 pm

Re: Installation of mod_harbour as module or fastcgi handler

Postby Antonio Linares » Mon Jun 21, 2021 7:36 am

Ricardo,

Necesitas tener un servidor dedicado. No puedes instalarlo en uno que sea compartido y no dedicado.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Installation of mod_harbour as module or fastcgi handler

Postby Otto » Mon Jun 21, 2021 10:35 am

Ricardo,

Why not xBhosts.com from FiveTech?


https://mybergland.com/fwforum/xbhosts.mp4

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6005
Joined: Fri Oct 07, 2005 7:07 pm

Re: Installation of mod_harbour as module or fastcgi handler

Postby ricardog » Mon Jun 21, 2021 6:03 pm

Muchisimas gracias Antonio, Otto, veré con mas detenimiento el servicio que Otto me sugiere.
De nuevo muchas gracias.
:D :D :D
ricardog
 
Posts: 158
Joined: Tue Oct 11, 2005 3:10 pm

Previous

Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 8 guests