Page 1 of 2

Migration to the new mod_harbour fastCGI

Posted: Fri Jun 19, 2020 7:05 pm
by Antonio Linares
AP_RPUTS() --> MH_ECHO()
AP_ARGS() --> MH_QUERY()
AP_HEADERSOUTSET( x, y ) --> MH_HEADER( x + y )
AP_BODY() --> MH_BODY()
MH stands for mod_harbour

mod_harbour.so --> mod_fcgid.so
libharbour.dll --> modharbour.exe
libfcgi.dll +
libcrypto-1_1-x64.dll, libcurl-x64.dll, libssl-1_1-x64.dll

Code: Select all

LoadModule fcgid_module modules/mod_fcgid.so
<FilesMatch "\.(prg|hrb)$">
    SetHandler fcgid-script
    Options +ExecCGI
    FcgidWrapper c:/Apache24/bin/modharbour.exe
</FilesMatch>

Re: Migration to the new mod_harbout fastCGI

Posted: Sat Jun 20, 2020 7:51 am
by Otto
Hello,
I am working on a little tool to convert from mod harblur classic to FastCGI.
Best regards,
Otto

Code: Select all


#include "FiveWin.ch"

//----------------------------------------------------------------------------//

function Main()
   local oDlg

   DEFINE DIALOG oDlg FROM 6, 6 TO 20, 60 TITLE "Convert Classic to FastCGI"

   @ 2, 2 BUTTON "&Convert to FASTCGI" OF oDlg ;
      ACTION ( convert() )

   @ 4, 2 BUTTON "&Bye!" OF oDlg ACTION oDlg:End()

   ACTIVATE DIALOG oDlg

return nil

//----------------------------------------------------------------------------//

function convert()
   local cText := ""
   local I := 0
   local aClassicToFASTCgi := {}
   local cPrg  := cGetFile( "(*.prg)|*.prg|", "Select prg" )
   local cDst := ""

   AADD( aClassicToFASTCgi, { "AP_RPUTS",          "MH_ECHO" } )
   AADD( aClassicToFASTCgi, { "AP_ARGS",           "MH_QUERY" } )
   AADD( aClassicToFASTCgi, { "AP_HEADERSOUTSET",  "MH_HEADER" } )
   AADD( aClassicToFASTCgi, { "AP_BODY",           "MH_BODY" } )

   cText := MemoRead( cPrg )

   for I = 1 to len( aClassicToFASTCgi )
      cText := STRTRAN(UPPER( cText ), aClassicToFASTCgi[I,1], aClassicToFASTCgi[I,2])
   next

   cDst := STRTRAN( UPPER( cPrg ), ".PRG", "_Fastcgi.prg" )
   memowrit( cDst, cText )

   ? "Done"
return nil

//----------------------------------------------------------------------------//

 

Re: Migration to the new mod_harbout fastCGI

Posted: Sat Jun 20, 2020 10:04 am
by Antonio Linares
For those curious about this new enhanced mod_harbour version:

it runs around FIVE times faster than previous one :-)

Re: Migration to the new mod_harbour fastCGI

Posted: Sat Jun 20, 2020 4:34 pm
by sysctrl2
Hi Antonio Simbolo No resolved
apache.obj : error LNK2001: s¡mbolo externo HB_FUN_MH_ARGS sin resolver

falta ese simblo ?

Re: Migration to the new mod_harbour fastCGI

Posted: Sat Jun 20, 2020 8:06 pm
by Massimo Linossi
Hi Antonio.
Have you made this new version with ADS ?
Thanks a lot
Massimo

Re: Migration to the new mod_harbour fastCGI

Posted: Sat Jun 20, 2020 10:09 pm
by Antonio Linares
César,
sysctrl2 wrote:Hi Antonio Simbolo No resolved
apache.obj : error LNK2001: s¡mbolo externo HB_FUN_MH_ARGS sin resolver

falta ese simblo ?
Ahora se llama MH_QUERY()

Re: Migration to the new mod_harbour fastCGI

Posted: Sat Jun 20, 2020 10:10 pm
by Antonio Linares
Massimo,
Massimo Linossi wrote:Hi Antonio.
Have you made this new version with ADS ?
Thanks a lot
Massimo
Not yet. It will be ready in a few days

Re: Migration to the new mod_harbour fastCGI

Posted: Sun Jun 21, 2020 2:08 pm
by Otto
Hello,
The file I posted is not working as all is converted to upper.
As workaround I use this for now.
This is working for me:

#translate AP_RPUTS => MH_ECHO
#translate AP_ARGS => MH_QUERY
#translate AP_HEADERSOUTSET => MH_HEADER
#translate AP_BODY => MH_BODY

Best regards
Otto

Re: Migration to the new mod_harbout fastCGI

Posted: Tue Jul 07, 2020 7:56 pm
by jvtecheto
Antonio Linares wrote:For those curious about this new enhanced mod_harbour version:

it runs around FIVE times faster than previous one :-)
Hi Antonio.

then I deduce that this will be the version to be used, we will have to leave mod_harbour to use
mod_harbourfascgi, and mercury, tweb etc will be updated to this new version. ?

thanks in advance and congratulations for your excellent work once again.

Jose.

Re: Migration to the new mod_harbour fastCGI

Posted: Wed Jul 08, 2020 6:17 am
by Antonio Linares
Jose,

It will require some time but surely yes

Re: Migration to the new mod_harbour fastCGI

Posted: Thu Jul 16, 2020 4:33 pm
by Massimo Linossi
Hello Antonio.
Any news about fastCGI with the ADS support ?
Thanks a lot.
Massimo

Re: Migration to the new mod_harbour fastCGI

Posted: Fri Jul 17, 2020 3:46 pm
by dakosimo
How about Windows 32 bit ?

This is huge step toward excellent product.

Best regards.

Dako.

Re: Migration to the new mod_harbour fastCGI

Posted: Sat Jul 18, 2020 7:16 am
by Antonio Linares
dakosimo wrote:How about Windows 32 bit ?

This is huge step toward excellent product.

Best regards.

Dako.
https://github.com/FiveTechSoft/mod_har ... dows/win32

Re: Migration to the new mod_harbour fastCGI

Posted: Tue Jul 21, 2020 3:50 pm
by Massimo Linossi
Massimo Linossi wrote:Hello Antonio.
Any news about fastCGI with the ADS support ?
Thanks a lot.
Massimo

Re: Migration to the new mod_harbour fastCGI

Posted: Tue Jul 21, 2020 6:31 pm
by Antonio Linares
Massimo,

I have not forgotten you :-)

Please excuse me for the delay