SOLVED : HRB give a empty page

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

Re: HRB give a empty page

Postby jfl@mafact.com » Sun Sep 19, 2021 7:35 pm

Here it is ...

Source code and inspect...

Nothing interesting I thing :/

Image
JF Lefebvre (Jean_François)
Mafact SA (Belgium)
http://www.mafact.com
jfl@mafact.com
 
Posts: 43
Joined: Tue Mar 25, 2008 7:22 pm

Re: HRB give a empty page

Postby Antonio Linares » Mon Sep 20, 2021 5:32 am

Please send me an email when you are online to connect to your PC using AnyDesk

I would like to do some tests on your PC if you don't mind it
regards, saludos

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

Re: HRB give a empty page

Postby Antonio Linares » Mon Sep 20, 2021 5:42 am

JF,

Please run this:

Code: Select all  Expand view
function Main()

   ExecuteHrb( hb_HrbLoad( 1, hb_GetEnv( "PRGPATH" ) + "/testhrb.hrb" ) )
   ? Time()

return nil


You can easily test it using mod_harbour modpro utility: (it is what I use for quick tests)
https://www.modharbour.org/modharbour_samples/modpro/modpro.prg (change the URL to localhost)

and just change this line this way:
ExecuteHrb( hb_HrbLoad( 1, hb_GetEnv( "PRGPATH" ) + "/../testhrb.hrb" ) )
regards, saludos

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

Re: HRB give a empty page

Postby jfl@mafact.com » Mon Sep 20, 2021 8:53 am

SO, it work under modpro, but not directly

I'm lost...

Image
Last edited by jfl@mafact.com on Mon Sep 20, 2021 9:08 am, edited 1 time in total.
JF Lefebvre (Jean_François)
Mafact SA (Belgium)
http://www.mafact.com
jfl@mafact.com
 
Posts: 43
Joined: Tue Mar 25, 2008 7:22 pm

Re: HRB give a empty page

Postby jfl@mafact.com » Mon Sep 20, 2021 9:05 am

Antonio Linares wrote:Please send me an email when you are online to connect to your PC using AnyDesk

I would like to do some tests on your PC if you don't mind it


And yes sure, let me know if you always have some thing to try ...

I'm here till 12h
JF Lefebvre (Jean_François)
Mafact SA (Belgium)
http://www.mafact.com
jfl@mafact.com
 
Posts: 43
Joined: Tue Mar 25, 2008 7:22 pm

Re: HRB give a empty page

Postby jfl@mafact.com » Mon Sep 20, 2021 9:26 am

Whoawww, it work from the folder "modharbour_samples" wich is a link folder

but not if I use a direct folder like "samples" I created under the root of the site.

I already had a similar problem with IIS and folder.

For example, I can't map a virtual folder form my D:\inetpub\www\modharbour\samples to e:\modharbour\samples
It launch the prg, but do not execute it.

So something similar here...

prg works fine from a virtuel folder under D:\inetpub\www\modharbour\samples to D:\inetpub\www\modharbour\samples
but not hrb.

creating a link "folder modharbour_samples" to e:\modharbour\samples
and adding a virtual folder to it work fine either for prg as hrb.

in the meantime this is a solution for me.

Strange, but working .

Thanks for your help and patience...

JF
JF Lefebvre (Jean_François)
Mafact SA (Belgium)
http://www.mafact.com
jfl@mafact.com
 
Posts: 43
Joined: Tue Mar 25, 2008 7:22 pm

Re: HRB give a empty page

Postby Otto » Mon Sep 20, 2021 10:36 am

Hello,
has APACHE fullaccess rights to the folder?
D:\inetpub\www\modharbour\samples

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: HRB give a empty page

Postby jfl@mafact.com » Mon Sep 20, 2021 2:43 pm

Otto wrote:Hello,
has APACHE fullaccess rights to the folder?
D:\inetpub\www\modharbour\samples

Best regards,
Otto


Yes, I double checked all the params I could, including rigth access.

In all case, I think this was solved by mklink folder, but I have other prg wich run nicelely as prg, but give just blanck page as HRB.

I became crazy.

PS: This is IIS, not apache.
JF Lefebvre (Jean_François)
Mafact SA (Belgium)
http://www.mafact.com
jfl@mafact.com
 
Posts: 43
Joined: Tue Mar 25, 2008 7:22 pm

Re: HRB give a empty page

Postby jfl@mafact.com » Mon Sep 20, 2021 3:40 pm

OUCHHH SOLVED ...

Very simple at all ...

? "Hello word"
does nothing in HRB

whilst
AP_RPuts( "Hello word" )
Work fine

My mistake clearly as the testhrb.prg was written correctly before I rewrote it :/
Thinking about it I should have seen it immediatly because compiling with harbour.exe cannot change ? to AP_RPUTS() function ...

So I tested now a medium app with ADS and many call to my internal library successfully.
JF Lefebvre (Jean_François)
Mafact SA (Belgium)
http://www.mafact.com
jfl@mafact.com
 
Posts: 43
Joined: Tue Mar 25, 2008 7:22 pm

Re: SOLVED : HRB give a empty page

Postby Antonio Linares » Mon Sep 20, 2021 3:54 pm

JF,

very good! :-)

Yes, AP_RPuts() has to be used instead of "?"
regards, saludos

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

Re: SOLVED : HRB give a empty page

Postby jfl@mafact.com » Mon Sep 20, 2021 8:04 pm

Antonio Linares wrote:JF,

very good! :-)

Yes, AP_RPuts() has to be used instead of "?"


Sorry for the lost time :/

Many thanks for your helps !

JF
JF Lefebvre (Jean_François)
Mafact SA (Belgium)
http://www.mafact.com
jfl@mafact.com
 
Posts: 43
Joined: Tue Mar 25, 2008 7:22 pm

Re: SOLVED : HRB give a empty page

Postby Antonio Linares » Tue Sep 21, 2021 3:10 am

> Sorry for the lost time :/

Never mind.

I should had remembered what you found :-)
regards, saludos

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

Re: SOLVED : HRB give a empty page

Postby Antonio Linares » Tue Sep 21, 2021 3:13 am

Updated testhrb.prg so we don't forget it:

https://github.com/FiveTechSoft/mod_harbour/blob/master/samples/testhrb.prg

// IMPORTANT: Use AP_RPuts() instead of "?"
regards, saludos

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

Re: SOLVED : HRB give a empty page

Postby jfl@mafact.com » Tue Sep 21, 2021 6:09 am

Antonio Linares wrote:Updated testhrb.prg so we don't forget it:

https://github.com/FiveTechSoft/mod_harbour/blob/master/samples/testhrb.prg

// IMPORTANT: Use AP_RPuts() instead of "?"


Hahaha, yes, good idea :)
JF Lefebvre (Jean_François)
Mafact SA (Belgium)
http://www.mafact.com
jfl@mafact.com
 
Posts: 43
Joined: Tue Mar 25, 2008 7:22 pm

Previous

Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 2 guests