FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index mod_harbour Great news regarding mod_harbour CGI !!!
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Great news regarding mod_harbour CGI !!!
Posted: Fri Nov 25, 2022 10:08 AM

Here it is working perfectly fine.

delivering an image is done by Apache automatically, mod_harbour does nothing there

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Great news regarding mod_harbour CGI !!!
Posted: Fri Nov 25, 2022 10:19 AM

Dear Antonio,

You should not work today on your birthday.

I wish you all the best again.

What you write works for me when I enter the absolute URL link https:// myserver.com/images/xxx.jpg

What exactly must be the link without first to the net and then back?

Where exactly in htaccess do I store the images.

A question for DUMMIES:

Is CGI to understand that here the harbourmachine is outside the webserber and then delivers the HTML code to the server?

Best regards,

Otto

PS: Please keep in mind that this server has only a 24/100 MBit/s connection to the internet.

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Great news regarding mod_harbour CGI !!!
Posted: Fri Nov 25, 2022 10:28 AM
Dear Antonio,
please see here:

https://winhotel.org/cgi-bin/MovieCenter/Main.prg

But I do not find out how this works without
<img src="https://cccccl.org/moviecenter/images/med.jpg"

Best regards,
Otto
Posts: 1710
Joined: Tue Oct 28, 2008 06:26 PM
Re: Great news regarding mod_harbour CGI !!!
Posted: Fri Nov 25, 2022 11:22 AM
Feliz cumple Estimado Antonio

He desinstalado Apache24 lo volví a instalar y aparecieron algunas imágenes

Luego borré el historial el navegador porque no aparecían todas

Ahora otra vez no aparece ninguna :(

Pudo haber sucedido que muestre porque antes lo hice sin cgi y las guardó en el cache
Saludos,



Adhemar C.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Great news regarding mod_harbour CGI !!!
Posted: Fri Nov 25, 2022 12:12 PM
Muchas gracias! :-)

Estás usando el fichero .htaccess y el httpd.conf que proporcionamos en el repo ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 50
Joined: Mon Sep 25, 2006 08:38 AM
Re: Great news regarding mod_harbour CGI !!!
Posted: Fri Nov 25, 2022 12:20 PM

Hi Antonio ,

i want to test "mod_harbour CGI" on CENTOS Linux .

What is the right way to do this ?

Copy modharbour in /cgi-bin/ under /var/www/ folder ?

And then create .htaccess in /var/www/html ( the same file of your link ) ?

Is it correct ?

Bye

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Great news regarding mod_harbour CGI !!!
Posted: Fri Nov 25, 2022 12:28 PM
Dear Giuliano,
Simply copy modharbour.exe and DLLs from here to your cgi-bin folder:
https://github.com/FiveTechSoft/mod_harbour/tree/master/cgi/windows

Copy .hcaccess to apache/htdocs:
https://github.com/FiveTechSoft/mod_harbour/blob/master/cgi/windows/.htaccess

And use this Apache configuration file:
https://github.com/FiveTechSoft/mod_harbour/blob/master/cgi/windows/httpd.conf
Then place a little test.prg in your cgi-bin folder like this one:
Code (fw): Select all Collapse
function Main()

   ? Time()

return nil
and then go to localhost/test from your browser :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1710
Joined: Tue Oct 28, 2008 06:26 PM
Re: Great news regarding mod_harbour CGI !!!
Posted: Fri Nov 25, 2022 12:46 PM
Antonio Linares wrote:Muchas gracias! :-)

Estás usando el fichero .htaccess y el httpd.conf que proporcionamos en el repo ?
Si
.htaccess
Code (fw): Select all Collapse
# Harbour - forward all request to modharbour.exe

RewriteEngine on
RewriteRule ^(.*\.prg) /cgi-bin/modharbour.exe?$1 [L,QSA]

RewriteEngine on
RewriteRule ^([^\.]+) /cgi-bin/modharbour.exe?$1.prg [L,QSA]
httpd
Code (fw): Select all Collapse
#Include conf/extra/httpd-dav.conf

# Various default settings
#Include conf/extra/httpd-default.conf

# Configure mod_proxy_html to understand HTML4/XHTML1
<IfModule proxy_html_module>
Include conf/extra/httpd-proxy-html.conf
</IfModule>

# Secure (SSL/TLS) connections
# Note: The following must must be present to support
#       starting without SSL on platforms with no /dev/random equivalent
#       but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
#Include conf/extra/httpd-ssl.conf
Include conf/extra/httpd-ahssl.conf
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
<IfModule http2_module>
    ProtocolsHonorOrder On
    Protocols h2 h2c http/1.1
</IfModule>

# PHP FastCGI
#
# Edit conf/extra/httpd-fcgid.conf to match your php location
# and uncomment the Include line below.
#
#Include conf/extra/httpd-fcgid.conf

<IfModule lua_module>
  AddHandler lua-script .lua
</IfModule>
Gracias por la ayuda
Saludos,



Adhemar C.
Posts: 50
Joined: Mon Sep 25, 2006 08:38 AM
Re: Great news regarding mod_harbour CGI !!!
Posted: Fri Nov 25, 2022 12:52 PM
Thanks Antonio .
Sorry . It's my mistake .
The folder where i place my test.prg is wrong.
Not in document root but in cgi-folder

Bye :D
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Great news regarding mod_harbour CGI !!!
Posted: Fri Nov 25, 2022 03:02 PM
Dear Antonio,
with absolute path for me, it is working.
I found this
https://webmasters.stackexchange.com/questions/96955/speed-comparison-absolute-vs-relative-path-links
So, there does not seem any speed difference.
Best regards,
Otto
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Great news regarding mod_harbour CGI !!!
Posted: Fri Nov 25, 2022 05:39 PM

What you get is robustness

Enviado desde mi SM-M325FV mediante Tapatalk

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: Great news regarding mod_harbour CGI !!!
Posted: Fri Nov 25, 2022 07:34 PM

Hi Antonio.

First of all happy birthday !!!

I'm trying to install your new version of modharbour on one Linux machine with Centos 7, 64bits.

This is hosted on Aruba, in Italy and the problem is that I have access only to FTP server, I cannot

copy the conf file for Apache and I can use only the cgi-bin folder or the root one.

Is there any chance to install modharbour without changing Apache configuration ?

Thanks a lot

Massimo

Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: Great news regarding mod_harbour CGI !!!
Posted: Mon Dec 05, 2022 05:58 PM

Hi Antonio.

Could be possible to have that PHP workaround that you use for launching modharbour on non dedicated servers ?

Thanks a lot.

Massimo

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Great news regarding mod_harbour CGI !!!
Posted: Tue Dec 06, 2022 09:12 AM
Dear Massimo,

This is the way we run modHarbour CGI on bluehost using PHP as a bridge:

modpro.php
Code (fw): Select all Collapse
<?php
   $result = shell_exec( "./modharbour modpro.prg" );
   print( substr( $result, strpos( $result, chr( 10 ).chr( 10 ) ) + 1 ) );
?>
You can test it here:
https://www.fivetechsoft.com/counter/modpro.php

Saved on the mod_harbour repo:
https://github.com/FiveTechSoft/mod_harbour/tree/master/linux/php_bridge
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion