mod_harbour for non dedicated servers

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

Re: mod_harbour for non dedicated servers

Postby Enrico Maria Giordano » Wed Jan 12, 2022 1:08 pm

My web space is on a Windows server.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: mod_harbour for non dedicated servers

Postby Antonio Linares » Wed Jan 12, 2022 1:16 pm

Here you have it:

https://github.com/FiveTechSoft/mod_harbour/tree/master/cgi/windows

You need the EXE and the DLL and you may use test.prg for a test:

test.php
Code: Select all  Expand view
<?php
   print( shell_exec( "modharbour.exe test.prg" ) );
?>


test.prg
Code: Select all  Expand view
function Main()

   ? "Hello world"

return nil
regards, saludos

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

Re: mod_harbour for non dedicated servers

Postby Enrico Maria Giordano » Wed Jan 12, 2022 4:18 pm

I created a folder in my webspace and named it mod_harbour. Then I copied the following file in it:

test.prg
libcurl-x64.dll
modharbour.exe
test.php

Then I open the following url in my browser:

https://www.emagsoftware.it/mod_harbour/test.prg

I get: Errore HTTP 404.3 - Not Found

Then I tried with:

https://www.emagsoftware.it/mod_harbour/test.php

And I get: Warning: shell_exec() has been disabled for security reasons in D:\inetpub\webs\emagsoftwareit\mod_harbour\test.php on line 2

What I'm doing wrong?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: mod_harbour for non dedicated servers

Postby Antonio Linares » Wed Jan 12, 2022 5:35 pm

Enrico,

They don't allow it:
shell_exec() has been disabled for security reasons


many thanks for your feedback
regards, saludos

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

Re: mod_harbour for non dedicated servers

Postby Enrico Maria Giordano » Wed Jan 12, 2022 8:21 pm

This is exactly what I was talking about. :-(

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: mod_harbour for non dedicated servers

Postby cnavarro » Thu Jan 13, 2022 1:24 pm

Enrico Maria Giordano wrote:My web space is on a Windows server.

EMG

I also have Windows Server running without restrictions
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: mod_harbour for non dedicated servers

Postby Antonio Linares » Sun Jan 16, 2022 12:55 pm

Enhanced version:

live tests:
https://www.fivetechsoft.com/counter/info.php
https://www.fivetechsoft.com/counter/modpro.php

test.php
Code: Select all  Expand view
<?php
   $result = shell_exec( "./modharbour test.prg" );
   print( substr( $result, strpos( $result, chr( 10 ).chr( 10 ) ) + 1 ) );
?>


run.php
Code: Select all  Expand view
<?php
   header('Access-Control-Allow-Origin: *');
   header('Access-Control-Allow-Methods: GET, POST');
   header("Access-Control-Allow-Headers: X-Requested-With");
   file_put_contents( "tmp.prg", $_POST["source"] );
   $result = shell_exec( "./modharbour tmp.prg" );
   print( substr( $result, strpos( $result, chr( 10 ).chr( 10 ) ) + 1 ) );
?>
regards, saludos

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

Re: mod_harbour for non dedicated servers

Postby Antonio Linares » Mon Jan 17, 2022 11:32 am

See this and thanks to Lailton for his great help !!!

http://www.fivetechsoft.com/counter/modpro.php

mod_harbour modpro example working from BlueHost (where no mod_harbour setup is allowed being a non dedicated server) !!! (using the PHP bridge)
regards, saludos

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

Re: mod_harbour for non dedicated servers

Postby Lailton » Thu Jan 20, 2022 3:34 am

You're welcome.

All looks nice :) good job.
Regards,
Lailton Fernando Mariano
User avatar
Lailton
 
Posts: 125
Joined: Fri Jul 20, 2012 1:49 am
Location: Brazil

Previous

Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 6 guests