Page 2 of 2

Re: mod_harbour for Apache

Posted: Sat Aug 29, 2020 2:40 am
by apais
index.prg
---------------------------------------
function Main()
? 'Hello World'
return NIL
---------------------------------------

Re: mod_harbour for Apache

Posted: Sat Aug 29, 2020 3:44 am
by ASESORMIX
Hola. Gracias por responder.
Tengo poco conocimiento en esta area ( soy programador de la vieja guardia )
y quisiera saber como debo empezar.
Cuales aplicaciones debo descargar, instalar y ejecutar en el pc server
y que debo hacer en mi pc cliente.
Solo quiero una breve explicación al respecto.
Nuevamente gracias.

Re: mod_harbour for Apache

Posted: Sat Aug 29, 2020 5:53 am
by apais
[español]
Estos programas, son módulos que se agregan al server apache.
Es un sustituto de php que te permite trabajar el back-end en tu lenguaje conocido y favorito.
Ello te permite que cada request que termina en .prg o .hrb sea interpretado por harbour, igual que los que terminan en .php son interpretados por php
En el cliente no cambia nada, usas tu firefox o chrome como siempre ya que las paginas son html/css/js como siempre.
Esta es una tecnología de SERVIDOR para tratar los datos, procesar las consultas y construir y devolver las páginas dinamicamente.
Ese ejemplo que puse antes es un hello world. Como puedes observar es un programa harbour normal, sólo que cada "?" va a la respuesta que recibe tu browser de internet.
Lo primero que tienes que hacer es instalar apache o xammp.
Despues te bajas la beta_4 desde https://www.mod-harbour.com
Contiene un archivo .rar con binarios para cada sistema operativo (win/lin/mac)
También hay un pequeño texto con instrucciones acerca de donde colocar cada .dll y cada .so ( modulo apache )
Despues agregas al httpd.conf de apache las líneas alli indicadas y listo, ya puedes crear el ejemplo que te pasé y ejecutarlo!
Mas adelante colgaré muchos más ejemplos de programas para ejecutar pero si te fijas, en la pagina esa tambien hay un demo completo del HMGWEB de Roberto López (quien gentilmente me dio permiso ), convertido desde CGI+php a estos web drivers y harbour.

[english]
These programs are modules that are added to the apache server.
It is a substitute for php that allows you to work the back-end in your already known and favorite language.
This allows each request that ends in .prg or .hrb to be interpreted by harbour, just as those that end in .php are interpreted by php
Nothing changed in the client, you use your firefox or chrome as usual since the pages are html / css / js as always.
This is a SERVER technology to process data, process queries, and dynamically build and return pages.
The example I put before is a hello world.
As you can see it is a normal harbor program, only that each "?" goes to the response that internet browser receives.
The first thing you have to do is install Apache or xammp.
Then you download the beta_4 from https://www.mod-harbour.com
It contains a .rar file with binaries for each operating system (win / lin / mac)
There is also a small text with instructions about where to put each .dll and each .so (apache module)
Then you add the lines indicated there to the httpd.conf of Apache, and that's it, you can create the example I gave you and run it!
Later I will post many more examples of programs to run but if you notice, on that page there is also a complete demo of Roberto López's HMGWEB (who kindly gave me permission), converted from CGI + php to hw_apache + harbour.

Saludos
Angel Pais

Re: mod_harbour for Apache

Posted: Sat Aug 29, 2020 8:23 am
by doctor_x_fran

Re: mod_harbour for Apache

Posted: Sat Aug 29, 2020 11:44 am
by bpd2000
apais wrote: Sat Aug 29, 2020 5:53 am
The first thing you have to do is install Apache or xammp.
Then you download the beta_4 from https://www.modharbour.com
Unable to open link

Re: mod_harbour for Apache

Posted: Sat Aug 29, 2020 1:12 pm
by apais

Re: mod_harbour for Apache

Posted: Sat Aug 29, 2020 8:38 pm
by jucar_es
:buenas tardes
Ya seguí todos los pasos

Pero chome me visualiza el prg..
Que habré echo mal......
Gracias

Re: mod_harbour for Apache

Posted: Sun Aug 30, 2020 12:42 am
by apais
Probablemente te olvidaste de cambiar el httpd.conf de Apache.
My Skype: samltda@outlook.com

Re: mod_harbour for Apache

Posted: Tue Sep 01, 2020 5:15 pm
by bpd2000
Hi Apais
Why I am getting error as per screen shot

Re: mod_harbour for Apache

Posted: Wed Sep 02, 2020 1:56 am
by apais
You can't call a service directly.
Surely you have 3 .bat there
1) for installing the service: install.bat
2) another for starting the service: start.bat
3) another for shutting down the service: stop.bat
HTH
Angel