Migration to the new mod_harbour fastCGI

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

Migration to the new mod_harbour fastCGI

Postby Antonio Linares » Fri Jun 19, 2020 7: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: Select all  Expand view  RUN
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
Antonio Linares
Site Admin
 
Posts: 42100
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Migration to the new mod_harbout fastCGI

Postby Otto » Sat Jun 20, 2020 7:51 am

Hello,
I am working on a little tool to convert from mod harblur classic to FastCGI.
Best regards,
Otto

Code: Select all  Expand view  RUN


#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
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: Migration to the new mod_harbout fastCGI

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42100
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Migration to the new mod_harbour fastCGI

Postby sysctrl2 » Sat Jun 20, 2020 4: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 "
User avatar
sysctrl2
 
Posts: 1020
Joined: Mon Feb 05, 2007 7:15 pm

Re: Migration to the new mod_harbour fastCGI

Postby Massimo Linossi » Sat Jun 20, 2020 8:06 pm

Hi Antonio.
Have you made this new version with ADS ?
Thanks a lot
Massimo
User avatar
Massimo Linossi
 
Posts: 498
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Migration to the new mod_harbour fastCGI

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42100
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Migration to the new mod_harbour fastCGI

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42100
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Migration to the new mod_harbour fastCGI

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

Re: Migration to the new mod_harbout fastCGI

Postby jvtecheto » Tue Jul 07, 2020 7: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
User avatar
jvtecheto
 
Posts: 598
Joined: Mon Mar 04, 2013 4:32 pm
Location: Spain

Re: Migration to the new mod_harbour fastCGI

Postby Antonio Linares » Wed Jul 08, 2020 6:17 am

Jose,

It will require some time but surely yes
regards, saludos

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

Re: Migration to the new mod_harbour fastCGI

Postby Massimo Linossi » Thu Jul 16, 2020 4:33 pm

Hello Antonio.
Any news about fastCGI with the ADS support ?
Thanks a lot.
Massimo
User avatar
Massimo Linossi
 
Posts: 498
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Migration to the new mod_harbour fastCGI

Postby dakosimo » Fri Jul 17, 2020 3:46 pm

How about Windows 32 bit ?

This is huge step toward excellent product.

Best regards.

Dako.
dakosimo
 
Posts: 9
Joined: Sun Nov 27, 2016 8:24 am

Re: Migration to the new mod_harbour fastCGI

Postby Antonio Linares » Sat Jul 18, 2020 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42100
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Migration to the new mod_harbour fastCGI

Postby Massimo Linossi » Tue Jul 21, 2020 3:50 pm

Massimo Linossi wrote:Hello Antonio.
Any news about fastCGI with the ADS support ?
Thanks a lot.
Massimo
User avatar
Massimo Linossi
 
Posts: 498
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: Migration to the new mod_harbour fastCGI

Postby Antonio Linares » Tue Jul 21, 2020 6:31 pm

Massimo,

I have not forgotten you :-)

Please excuse me for the delay
regards, saludos

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

Next

Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 6 guests

cron