Migration to the new mod_harbour fastCGI

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Migration to the new mod_harbour fastCGI

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

Antonio Linares
www.fivetechsoft.com
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Migration to the new mod_harbout fastCGI

Post 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

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

 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Migration to the new mod_harbout fastCGI

Post by Antonio Linares »

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
User avatar
sysctrl2
Posts: 833
Joined: Mon Feb 05, 2007 7:15 pm
Contact:

Re: Migration to the new mod_harbour fastCGI

Post by sysctrl2 »

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

Re: Migration to the new mod_harbour fastCGI

Post by Massimo Linossi »

Hi Antonio.
Have you made this new version with ADS ?
Thanks a lot
Massimo
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Migration to the new mod_harbour fastCGI

Post 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()
regards, saludos

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

Re: Migration to the new mod_harbour fastCGI

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

Antonio Linares
www.fivetechsoft.com
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: Migration to the new mod_harbour fastCGI

Post 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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
jvtecheto
Posts: 357
Joined: Mon Mar 04, 2013 4:32 pm
Location: Spain

Re: Migration to the new mod_harbout fastCGI

Post 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.
Fwh 19.06 32 bits + Harbour 3.2dev(r2011030937)+ Borland 7.4 + FivEdit
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Migration to the new mod_harbour fastCGI

Post by Antonio Linares »

Jose,

It will require some time but surely yes
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Massimo Linossi
Posts: 474
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Migration to the new mod_harbour fastCGI

Post by Massimo Linossi »

Hello Antonio.
Any news about fastCGI with the ADS support ?
Thanks a lot.
Massimo
dakosimo
Posts: 9
Joined: Sun Nov 27, 2016 8:24 am

Re: Migration to the new mod_harbour fastCGI

Post by dakosimo »

How about Windows 32 bit ?

This is huge step toward excellent product.

Best regards.

Dako.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Migration to the new mod_harbour fastCGI

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

Antonio Linares
www.fivetechsoft.com
User avatar
Massimo Linossi
Posts: 474
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Migration to the new mod_harbour fastCGI

Post by Massimo Linossi »

Massimo Linossi wrote:Hello Antonio.
Any news about fastCGI with the ADS support ?
Thanks a lot.
Massimo
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Migration to the new mod_harbour fastCGI

Post by Antonio Linares »

Massimo,

I have not forgotten you :-)

Please excuse me for the delay
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply