Page 2 of 2

Re: HRB give a empty page

PostPosted: Sun Sep 19, 2021 7:35 pm
by jfl@mafact.com
Here it is ...

Source code and inspect...

Nothing interesting I thing :/

Image

Re: HRB give a empty page

PostPosted: Mon Sep 20, 2021 5:32 am
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

Re: HRB give a empty page

PostPosted: Mon Sep 20, 2021 5:42 am
by Antonio Linares
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" ) )

Re: HRB give a empty page

PostPosted: Mon Sep 20, 2021 8:53 am
by jfl@mafact.com
SO, it work under modpro, but not directly

I'm lost...

Image

Re: HRB give a empty page

PostPosted: Mon Sep 20, 2021 9:05 am
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

Re: HRB give a empty page

PostPosted: Mon Sep 20, 2021 9:26 am
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

Re: HRB give a empty page

PostPosted: Mon Sep 20, 2021 10:36 am
by Otto
Hello,
has APACHE fullaccess rights to the folder?
D:\inetpub\www\modharbour\samples

Best regards,
Otto

Re: HRB give a empty page

PostPosted: Mon Sep 20, 2021 2:43 pm
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.

Re: HRB give a empty page

PostPosted: Mon Sep 20, 2021 3:40 pm
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.

Re: SOLVED : HRB give a empty page

PostPosted: Mon Sep 20, 2021 3:54 pm
by Antonio Linares
JF,

very good! :-)

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

Re: SOLVED : HRB give a empty page

PostPosted: Mon Sep 20, 2021 8:04 pm
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

Re: SOLVED : HRB give a empty page

PostPosted: Tue Sep 21, 2021 3:10 am
by Antonio Linares
> Sorry for the lost time :/

Never mind.

I should had remembered what you found :-)

Re: SOLVED : HRB give a empty page

PostPosted: Tue Sep 21, 2021 3:13 am
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 "?"

Re: SOLVED : HRB give a empty page

PostPosted: Tue Sep 21, 2021 6:09 am
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 :)