FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index mod_harbour Migration to the new mod_harbour fastCGI
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Migration to the new mod_harbour fastCGI
Posted: Fri Jun 19, 2020 07:05 PM
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 (fw): Select all Collapse
LoadModule fcgid_module modules/mod_fcgid.so
<FilesMatch "\.(prg|hrb)$">
    SetHandler fcgid-script
    Options +ExecCGI
    FcgidWrapper c:/Apache24/bin/modharbour.exe
</FilesMatch>
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: Migration to the new mod_harbout fastCGI
Posted: Sat Jun 20, 2020 07:51 AM
Hello,
I am working on a little tool to convert from mod harblur classic to FastCGI.
Best regards,
Otto

Code (fw): Select all Collapse
#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

//----------------------------------------------------------------------------//
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Migration to the new mod_harbout fastCGI
Posted: Sat Jun 20, 2020 10:04 AM

For those curious about this new enhanced mod_harbour version:

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1144
Joined: Mon Feb 05, 2007 07:15 PM
Re: Migration to the new mod_harbour fastCGI
Posted: Sat Jun 20, 2020 04:34 PM

Hi Antonio Simbolo No resolved
apache.obj : error LNK2001: s¡mbolo externo HB_FUN_MH_ARGS sin resolver

falta ese simblo ?

Cesar Cortes Cruz

SysCtrl Software

Mexico



' Sin +- FWH es mejor "
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: Migration to the new mod_harbour fastCGI
Posted: Sat Jun 20, 2020 08:06 PM

Hi Antonio.
Have you made this new version with ADS ?
Thanks a lot
Massimo

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Migration to the new mod_harbour fastCGI
Posted: Sat Jun 20, 2020 10:09 PM
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()
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Migration to the new mod_harbour fastCGI
Posted: Sat Jun 20, 2020 10:10 PM
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
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
Re: Migration to the new mod_harbour fastCGI
Posted: Sun Jun 21, 2020 02:08 PM

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

Posts: 607
Joined: Mon Mar 04, 2013 04:32 PM
Re: Migration to the new mod_harbout fastCGI
Posted: Tue Jul 07, 2020 07:56 PM
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.
Fwh 24.07 64 bits + Harbour 64 bits 3.2dev(r2407221137) + MSVC64
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Migration to the new mod_harbour fastCGI
Posted: Wed Jul 08, 2020 06:17 AM

Jose,

It will require some time but surely yes

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: Migration to the new mod_harbour fastCGI
Posted: Thu Jul 16, 2020 04:33 PM

Hello Antonio.
Any news about fastCGI with the ADS support ?
Thanks a lot.
Massimo

Posts: 9
Joined: Sun Nov 27, 2016 08:24 AM
Re: Migration to the new mod_harbour fastCGI
Posted: Fri Jul 17, 2020 03:46 PM

How about Windows 32 bit ?

This is huge step toward excellent product.

Best regards.

Dako.

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Migration to the new mod_harbour fastCGI
Posted: Sat Jul 18, 2020 07:16 AM
dakosimo wrote:How about Windows 32 bit ?

This is huge step toward excellent product.

Best regards.

Dako.


https://github.com/FiveTechSoft/mod_harbour/tree/master/fastcgi/windows/win32
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: Migration to the new mod_harbour fastCGI
Posted: Tue Jul 21, 2020 03:50 PM
Massimo Linossi wrote:Hello Antonio.
Any news about fastCGI with the ADS support ?
Thanks a lot.
Massimo
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Migration to the new mod_harbour fastCGI
Posted: Tue Jul 21, 2020 06:31 PM

Massimo,

I have not forgotten you :-)

Please excuse me for the delay

regards, saludos

Antonio Linares
www.fivetechsoft.com