Re: Error running executable

Mike Aubury <[email protected]> Fri, 26 Nov 2021 11:01:27 +0000
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <CAGAq4WG6jUF+zfoaEKrE8HxK7gSqXp6W9eOaVVONwR1Jm_7yQw@mail.gmail.com>
It'd be interesting to see what the generated C code looks like for the
function containing that code.
My guess is that for some reason, it thinks that session_data column is a
blob..

On Fri, 26 Nov 2021 at 10:36, Ruud Baart <[email protected]> wrote:

> I found a solution or more specific a workaround.
>
> Problem is the definition of the record.
>
> define
>     s record like session.*
>
> Change it to
>
> define
>         s record
>                 seqno integer,
>                 session_id CHAR(100),
>                 session_uid CHAR(50),
>                 session_ip CHAR(50),
>                 session_start CHAR(30) ,
>                 session_lastmodified CHAR(30),
>                 session_data CHAR(500)
>         end record
>
> No error. I assume I did nothing wrong but perhaps there is something
> wrong in reading the table definition.
>
> My server: most recent aubit, debian version 10.11 (buster), postgres 11.14
>
> =======================================
>
> Tried something else:
>
> I took the function with the statement
>
> let s.session_data = 'new'
>
> and changed the function to a "main" block with some adjustments to make
> it work and placed it in de cgi directory. If I run the program - just like
> the other not working program - it will work as expected. No error, no
> problem.
>
> I really have no idea what the problem is. Apparently not the 4gl-code
> itself nor the  Apache/cgi environment.
>
> On 25-11-2021 19:39, Mike Aubury wrote:
>
> Whats the definition for that 's' variable?
>
> let s.session_data = 'new'
>
> The error seems to relate to trying to convert a character string into a
> blob variable..
>
> Nothing special:
>
> create table session (
>         seqno SERIAL PRIMARY KEY,
>         session_id CHAR(100) not null,
>         session_uid CHAR(50) not null,
>         session_ip CHAR(50),
>         session_start CHAR(30) not null,
>         session_lastmodified CHAR(30),
>         session_data CHAR(500))
>
> in 4gl code
>
>     s record like session.*
>
> So nothing special. Running the same code in a stripped program it works
> fine. Therefore I think it has something to do with Apache/cgi environment.
> But not sure. I can't image it has something to do with a blob variable.
>
> On Thu, 25 Nov 2021 at 18:17, <[email protected]> wrote:
>
>> Hi,
>>
>> I have a weird problem.
>>
>> I have an executable running on a debian server in /usr/lib/cgi, running
>> uid en gid www-data. Until now I did not have real problems but I'm
>> expanding the executable with functions. Nothings strange.
>>
>> The executable now stops on the next line:
>>
>> let s.session_data = 'new'
>>
>> Not a real fancy statement. It gives no direct errors but in the apache
>> logfile the following error:
>>
>> [Thu Nov 25 18:43:49.029580 2021] [cgi:error] [pid 10058] [client
>> 192.168.10.50:18237] AH01215: Err:Program /usr/lib/cgi-bin/entryform.4ae
>> stopped at 'entryform-l03.4gl', line number 32.:
>> /usr/lib/cgi-bin/entryform, referer:
>> http://192.168.10.90/cgi-bin/entryform
>> [Thu Nov 25 18:43:49.029636 2021] [cgi:error] [pid 10058] [client
>> 192.168.10.50:18237] AH01215: Error status number -30414.:
>> /usr/lib/cgi-bin/entryform, referer:
>> http://192.168.10.90/cgi-bin/entryform
>> [Thu Nov 25 18:43:49.029656 2021] [cgi:error] [pid 10058] [client
>> 192.168.10.50:18237] AH01215: Unable to create blobfile.:
>> /usr/lib/cgi-bin/entryform, referer:
>> http://192.168.10.90/cgi-bin/entryform
>> [Thu Nov 25 18:43:49.029661 2021] [cgi:error] [pid 10058] [client
>> 192.168.10.50:18237] AH01215: : /usr/lib/cgi-bin/entryform, referer:
>> http://192.168.10.90/cgi-bin/entryform
>> [Thu Nov 25 18:43:49.029678 2021] [cgi:error] [pid 10058] [client
>> 192.168.10.50:18237] AH01215: 4gl function call stack ::
>> /usr/lib/cgi-bin/entryform, referer:
>> http://192.168.10.90/cgi-bin/entryform
>> [Thu Nov 25 18:43:49.029750 2021] [cgi:error] [pid 10058] [client
>> 192.168.10.50:18237] AH01215:     entryform-l01.4gl (Line 92) calls
>> create_session(): /usr/lib/cgi-bin/entryform, referer:
>> http://192.168.10.90/cgi-bin/entryform
>> [Thu Nov 25 18:43:49.029773 2021] [cgi:error] [pid 10058] [client
>> 192.168.10.50:18237] AH01215:     MAIN: /usr/lib/cgi-bin/entryform,
>> referer: http://192.168.10.90/cgi-bin/entryform
>>
>> If I disable this line in the 4gl-code it stops on the next line:
>>
>> let s.session_id = s.session_start, "|", s.session_uid clipped, "|
>>
>> I think it has to do with the fact the application in running as cgi
>> binary but I'm not sure. If I use the code stripped from the command
>> line it works.
>>
>> Anyone a clue for me?
>>
>> --
>>
>> Cordialement,
>>
>> R.J. Baart
>>
> _______________________________________________
> Aubit4gl-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
>

_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss