Subject | Re: [firebird-php] Re: ibserver terminated abnormally (-1) |
---|---|
Author | Milan Babuskov |
Post date | 2004-01-06T15:12:22Z |
Valentin Voev wrote:
I'm almost definetly sure that somewhere here lies the problem, perhaps
you could try to execute this UDF few times by hand, and watch server
log file to see if it crashes?
--
Milan Babuskov
http://fbexport.sourceforge.net
>>Perhaps you're using some UDFs that crash the server on Linux?This looks like a Delphi UDF. How do you use it on Linux? Kylix perhaps?
>
>
> Hi Milan,
> Actually I'm using one UDF (ib_uppercase), but I think the code is
> clear...
>
> unit my_ib_udf_m;
>
> interface
>
> uses ib_util;
>
> function ib_uppercase(Value: PChar): PChar; cdecl;
>
> function ib_util_malloc(l: integer): pointer; cdecl;
> external 'ib_util.dll';
>
> implementation
>
> function ib_uppercase(Value: PChar): PChar;
> const
> Shift = 32;
> var
> I: Integer;
> begin
> I := 0;
> while (Value[I] <> #0) do
> begin
> if (Ord(Value[I]) in [97..122, 224..255]) then
> Value[I] := Char(Ord(Value[I]) - Shift);
> Inc(I);
> end;
> Inc(I);
> Result := ib_util_malloc(I);
> Move(Value^, Result^, I);
> end;
I'm almost definetly sure that somewhere here lies the problem, perhaps
you could try to execute this UDF few times by hand, and watch server
log file to see if it crashes?
--
Milan Babuskov
http://fbexport.sourceforge.net