SOLVED : HRB give a empty page

mod_harbour is an Apache module that allows to run PRGs directly on the web !!!
jfl@mafact.com
Posts: 43
Joined: Tue Mar 25, 2008 7:22 pm

Re: HRB give a empty page

Post by jfl@mafact.com »

Here it is ...

Source code and inspect...

Nothing interesting I thing :/

Image
JF Lefebvre (Jean_François)
Mafact SA (Belgium)
http://www.mafact.com
User avatar
Antonio Linares
Site Admin
Posts: 42508
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 30 times
Been thanked: 72 times
Contact:

Re: HRB give a empty page

Post by Antonio Linares »

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: 42508
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 30 times
Been thanked: 72 times
Contact:

Re: HRB give a empty page

Post by Antonio Linares »

JF,

Please run this:

Code: Select all | Expand

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
jfl@mafact.com
Posts: 43
Joined: Tue Mar 25, 2008 7:22 pm

Re: HRB give a empty page

Post by jfl@mafact.com »

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

Post by jfl@mafact.com »

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

Post by jfl@mafact.com »

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
User avatar
Otto
Posts: 6403
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 21 times
Been thanked: 2 times
Contact:

Re: HRB give a empty page

Post by Otto »

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
********************************************************************
jfl@mafact.com
Posts: 43
Joined: Tue Mar 25, 2008 7:22 pm

Re: HRB give a empty page

Post by jfl@mafact.com »

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

Post by jfl@mafact.com »

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
User avatar
Antonio Linares
Site Admin
Posts: 42508
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 30 times
Been thanked: 72 times
Contact:

Re: SOLVED : HRB give a empty page

Post by Antonio Linares »

JF,

very good! :-)

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

Antonio Linares
www.fivetechsoft.com
jfl@mafact.com
Posts: 43
Joined: Tue Mar 25, 2008 7:22 pm

Re: SOLVED : HRB give a empty page

Post by jfl@mafact.com »

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
User avatar
Antonio Linares
Site Admin
Posts: 42508
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 30 times
Been thanked: 72 times
Contact:

Re: SOLVED : HRB give a empty page

Post by Antonio Linares »

> 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: 42508
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 30 times
Been thanked: 72 times
Contact:

Re: SOLVED : HRB give a empty page

Post by Antonio Linares »

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
jfl@mafact.com
Posts: 43
Joined: Tue Mar 25, 2008 7:22 pm

Re: SOLVED : HRB give a empty page

Post by jfl@mafact.com »

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
Post Reply