[Gambas-user] gb.web.gui application with apache2

Benoît Minisini g4mba5 at gmail.com
Mon May 4 01:49:34 CEST 2020


Le 04/05/2020 à 00:41, Benoît Minisini a écrit :
> Le 04/05/2020 à 00:37, Benoît Minisini a écrit :
>> Le 03/05/2020 à 23:53, Benoît Minisini a écrit :
>>> Le 03/05/2020 à 22:00, Safiur Rahman a écrit :
>>>> Hi
>>>>
>>>> I found the bug which is causing problem in loading any form in 
>>>> gb.web.gui.
>>>> Args[0] in Static Public Sub Main() of WebForm Class is not taking
>>>> value. 
>>>
>>> Thanks for the investigation.
>>>
>>> Normally Args[0] is always the name of the executable. How could it 
>>> be void?
>>>
>>
>> I have just tested by running a Gambas CGI script executable through 
>> an Apache server located on a server of the company I work for: 
>> Args[0] is not void, and returns the absolute path of the executable.
>>
>> Can you investigate or your own apache server to see why Args[0] is void?
>>
> 
> I just saw that it's possible for a parent process to set its first 
> argument to NULL before running a child process.
> 
> So I should find a way for a Gambas program to run itself again without 
> relying on Args[0]... Weird!
> 

Sorry, I told you rubbish.

Your Gambas executable 'newapp' is actually a script run through the 
'gbr3' command.

So the executed command is actually 'gbr3 <path to newapp>'.

It's the gambas interpreter then that put '<path to newapp>' in argv[0]. 
So it is impossible to Args[0] to be void.

-- 
Benoît Minisini


More information about the User mailing list