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

SOLVED : HRB give a empty page

Post by jfl@mafact.com »

Hello,

Any idea ?

On IIS Windows (not FastCGI), when I launch testhrb.prg it work, but doing the same with testhrb.hrb, just compiled with
harbour -gh -n I receive a totaly empty screen.

The IIS log file give me nothing different from prg and hrb at all

#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2021-09-18 18:33:49
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2021-09-18 18:37:54 192.168.10.52 GET /samples/testhrb.prg - 80 - 192.168.10.52 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/93.0.4577.82+Safari/537.36 - 200 0 0 3798
2021-09-18 18:41:35 192.168.10.52 GET /samples/testhrb.hrb - 80 - 192.168.10.52 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/93.0.4577.82+Safari/537.36 - 200 0 0 3838

I became crazy :/

JF Lefebvre
Last edited by jfl@mafact.com on Mon Sep 20, 2021 3:41 pm, edited 1 time in total.
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 »

Dear JF,

testhrb.prg and testhrb.hrb they both work fine with IIS and mod_harbour here

Please run this and let me know what you get:

? ModBuildDate()

Here I get: May 28 2021 09:17:25

The path used for mod_harbour from IIS modules settings is:
C:\mod_harbour\IIS\msvc\x64\Release\mod_harbour.dll

many thanks for your feedback
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 »

Hi Antonio,

Thanks for your reply during the we :)

I compiled by myself libharbour.dll adding most of my usual libraries.

So I wonder what I can have broken doing so :/

? ModBuildDate() => Jul 18 2021 18:14:29

Perhaps, one of my own function name colide with one of yours ...
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 »

I have just updated the mod_harbour repo with the build that I just did for the tests:

https://github.com/FiveTechSoft/mod_harbour/tree/master/IIS/msvc/x64/Release

So currently you can run PRGs but can't run HRBs ?

Are you using it with ADS ?
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 »

I continue to investigate and wrote this one ...

function Test()

? ModBuildDate()
? "Hello world from a .prg file"

ExecHrb( "TestHrb.hrb")

return nil

Function ExecHrb(cHrb, ...)
Local oHrb, lResult:=.F., xResult
if File( hb_GetEnv( "PRGPATH" ) + "/" + cHrb )
oHrb := hb_HrbLoad( 1, hb_GetEnv( "PRGPATH" ) + "/" + cHrb )
lResult = .T.
endif

if lResult
? oHrb
xResult:= hb_HrbDo(oHrb, ...)
endif

Return xResult

with this result ;

Jul 18 2021 18:14:29
Hello world from a .prg file
0x0000022B909E08B8

So the problem seem to be at Hb_HrbDo ...
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 »

Hi Antonio,

Yes, I see, I will replace my mod_harbour.dll and libharbour.dll version with your and retry.

And Yes, I use ADS version. All is working fin with prg.

I wrote many Json webservice to access my back end invoicing and stock program from the net and all is working fine.

The last step is to compile all may prg into hrb to protect my sources :)

Will let you know the result whit your dlls in a few moments ...
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 »

Interesting ...

Blank page with testhrb.hrb

and this one with my test program

May 28 2021 09:17:25
Hello world from a .prg file
0x0000022B90939A78

So the problème seem to be in the IIS config probably.
Addendum : I really see nothing from IIS side wich could cause that result. :/

What do you thing ?
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 download this file and rename it as libharbour.dll:

https://github.com/FiveTechSoft/mod_harbour/raw/master/IIS/libharbour_ads.dll

The previous one was not for ADS. This one is for ADS and should work fine for you.
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 »

Please do a git pull as I have updated the batch files so the project is cleaned before built
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 »

OK, will try that now.

Thanks
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 »

I Fully recompile either Mod_Harbour.dll as libharbour.dll

Same problem,
and same problem with your last release (with and without ADS)

I begin to desperate :/

Result of test.prg

Sep 19 2021 12:39:06
Hello world from a .prg file
0x000001B7C574A3D8
Last edited by jfl@mafact.com on Sun Sep 19, 2021 12:44 pm, edited 1 time in total.
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 »

JF,

Please right click on the empty web page, select inspect and check if there are any errors or warnings there
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 »

Have you reviewed the log files in c:\inetpub\logs\LogFiles\ ?

Please locate the hrb request and see what it says
2021-09-19 07:24:02 ::1 GET /modharbour_samples/testhrb.hrb - 80 - ::1 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/93.0.4577.82+Safari/537.36 - 200 0 0 232
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 »

Nothing, incredible ...

Image

#Software: Microsoft Internet Information Services 10.0
#Version: 1.0
#Date: 2021-09-19 11:57:30
#Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken
2021-09-19 12:04:16 192.168.10.52 GET /samples/testhrb.prg - 80 - 192.168.10.52 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/93.0.4577.82+Safari/537.36 - 200 0 0 3811
2021-09-19 12:04:26 192.168.10.52 GET /samples/testhrb.hrb - 80 - 192.168.10.52 Mozilla/5.0+(Windows+NT+10.0;+Win64;+x64)+AppleWebKit/537.36+(KHTML,+like+Gecko)+Chrome/93.0.4577.82+Safari/537.36 - 200 0 0 3813
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 right click on the empty web page and select view page source code, also select inspect and check what "Elements" you get
and let me know what you get
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply