# ext/interbase maintanance

- Thread: https://externals.io/message/89858
- Original archive: https://news-web.php.net/php.internals/89858
- Started by Anatol Belski on 2015-12-21T14:30:24+00:00
- Messages: 8
- RFC: Removal of dead SAPIs and extensions (Implemented (PHP 7.0)) — https://externals.io/rfc/removal_of_dead_sapis_and_exts.md
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #89858 — Anatol Belski — 2015-12-21T14:30:24+00:00

URL: https://externals.io/message/89858#89858

Hi Marius Adrian,

It's a ping as you was expressing the intention to maintain ext/interbase
https://wiki.php.net/rfc/removal_of_dead_sapis_and_exts#extinterbase . How
it currently looks like, ext/interbase is still broken and is not completely
ported to PHP7. Fe there's currently this bug ticket
https://bugs.php.net/bug.php?id=71175 and there are quite bad compilation
warnings (only a part linked here
https://gist.github.com/weltling/b352eace02ef5e1c4797 ). As Firebird is used
less often, it's not the case for a quick fix for everyone, as the test
environment is missing. Could you please go for the ext/interbase now? For
the particular bug and in general, it was only taken off from voting because
you've expressed the intention to maintain it
http://grokbase.com/p/php/php-internals/151mxve1t5/php-dev-rfc-discussion-re
moval-of-dead-sapis-and-extensions .

Thanks

Anatol

---

## #89860 — Lester Caine — 2015-12-22T00:54:46+00:00

URL: https://externals.io/message/89858#89860 · In reply to: #89858

> It's a ping as you was expressing the intention to maintain ext/interbase
> https://wiki.php.net/rfc/removal_of_dead_sapis_and_exts#extinterbase . How
> it currently looks like, ext/interbase is still broken and is not completely
> ported to PHP7. Fe there's currently this bug ticket
> https://bugs.php.net/bug.php?id=71175 and there are quite bad compilation
> warnings (only a part linked here
> https://gist.github.com/weltling/b352eace02ef5e1c4797 ). As Firebird is used
> less often, it's not the case for a quick fix for everyone, as the test
> environment is missing. Could you please go for the ext/interbase now? For
> the particular bug and in general, it was only taken off from voting because
> you've expressed the intention to maintain it
> http://grokbase.com/p/php/php-internals/151mxve1t5/php-dev-rfc-discussion-re
> moval-of-dead-sapis-and-extensions .

We need help from someone who understands exactly what has been changed :(
A lot of work was done back in February, but since then no further input
has been provided, and questions asked back then still remain
unanswered. We were I think waiting for the later PHP7 changes to be
implemented but since the extension continued to compile and work ...

For me the extension is working quite happily, but the latest
corrections posted by laruence are NOT compiling on my copy here so I
will go back to the working copy and check things out from there. I
think I am seeing the same warnings as #70071 on my working compile but
my warnings are 'comparison between pointer and integer' relating to
handles to the database links, and I am then getting lost.

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

---

## #89864 — Xinchen Hui — 2015-12-22T08:43:37+00:00

URL: https://externals.io/message/89858#89864 · In reply to: #89858

Hey:

On Mon, Dec 21, 2015 at 10:30 PM, Anatol Belski <anatol.php@belski.net>
wrote:

> Hi Marius Adrian,
>
> It's a ping as you was expressing the intention to maintain ext/interbase
> https://wiki.php.net/rfc/removal_of_dead_sapis_and_exts#extinterbase . How
> it currently looks like, ext/interbase is still broken and is not
> completely
> ported to PHP7. Fe there's currently this bug ticket
> https://bugs.php.net/bug.php?id=71175 and there are quite bad compilation
> warnings (only a part linked here
> https://gist.github.com/weltling/b352eace02ef5e1c4797 ). As Firebird is
> used
> less often, it's not the case for a quick fix for everyone, as the test
> environment is missing. Could you please go for the ext/interbase now? For
> the particular bug and in general, it was only taken off from voting
> because
> you've expressed the intention to maintain it
>
> http://grokbase.com/p/php/php-internals/151mxve1t5/php-dev-rfc-discussion-re
> moval-of-dead-sapis-and-extensions .
>
> Here is a working patch of mine:
https://gist.github.com/laruence/f3af903012902818d7da

if you are going to work on this, please base on this one.

since I still don't have setup a evn to test it... so there might be some
problems

thanks

> Thanks
>
> Anatol
>
>
> --
> 
> 
>



-- 
Xinchen Hui
@Laruence
http://www.laruence.com/

---

## #89867 — Lester Caine — 2015-12-22T10:23:06+00:00

URL: https://externals.io/message/89858#89867 · In reply to: #89864

> > […]
> https://gist.github.com/laruence/f3af903012902818d7da
> 
> if you are going to work on this, please base on this one.
> 
> since I still don't have setup a evn to test it... so there might be some
> problems
> 
> thanks

Xinchen ... working test setup should be easy, but I'm more than happy
to run tests, my problem is the core code has changed so drastically
since I ACTUALLY did bug fixes at that level that I don't understand the
current methods :(

I can understand this new patch but I still need to back-pedal the old
one. The only bit I'm not quite following is the switching between
'NULL' and '0' as I'm not sure why you are switching to '0' for some
handles that are currently 'NULL' and then defaulting others which were
'0' to 'NULL'  but I think it's that we are now passing a pointer rather
than a handle?

I need to re-sync my repository with git.php.net then at least I can
track and roll back changes ... I'll get back to this later

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

---

## #89868 — Xinchen Hui — 2015-12-22T11:41:47+00:00

URL: https://externals.io/message/89858#89868 · In reply to: #89867

Hey：

Sent from my iPhone

> 
> 
> 
> > […]
> 
> Xinchen ... working test setup should be easy, but I'm more than happy
> to run tests, my problem is the core code has changed so drastically
> since I ACTUALLY did bug fixes at that level that I don't understand the
> current methods :(
> 
> I can understand this new patch but I still need to back-pedal the old
> one. The only bit I'm not quite following is the switching between
> 'NULL' and '0' as I'm not sure why you are switching to '0' for some
> handles that are currently 'NULL' and then defaulting others which were
> '0' to 'NULL'  but I think it's that we are now passing a pointer rather
> than a handle?
> 
complier wanrning about handle are int

Anyway, this patch is not finish,  I hope I can finish this whole work in this week

Will update here when it is done

Thanks
> I need to re-sync my repository with git.php.net then at least I can
> track and roll back changes ... I'll get back to this later
> 
> -- 
> Lester Caine - G8HFL
> -----------------------------
> Contact - http://lsces.co.uk/wiki/?page=contact
> L.S.Caine Electronic Services - http://lsces.co.uk
> EnquirySolve - http://enquirysolve.com/
> Model Engineers Digital Workshop - http://medw.co.uk
> Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

---

## #89877 — Xinchen Hui — 2015-12-23T05:31:20+00:00

URL: https://externals.io/message/89858#89877 · In reply to: #89868

Hey:




> Hey：
>
> Sent from my iPhone
>
> > […]
> some
> > […]
> complier wanrning about handle are int
>
> Anyway, this patch is not finish,  I hope I can finish this whole work in
> this week
>
> Will update here when it is done
>
Consider it done.

No compiler warnings anymore(expect the char* and ISC_UCHAR* mismatch)

However, there are some test fails, which I am not quite sure about.

Anyone who is faimilar with firebird, please help

https://gist.github.com/laruence/f3af903012902818d7da

thanks

>
> Thanks
> > […]
>



-- 
Xinchen Hui
@Laruence
http://www.laruence.com/

---

## #89878 — Lester Caine — 2015-12-23T11:54:49+00:00

URL: https://externals.io/message/89858#89878 · In reply to: #89877

> Consider it done.
> 
> No compiler warnings anymore(expect the char* and ISC_UCHAR* mismatch)

Just on ibase_events.c which is async access to firebird/interbase  This
is an area that needs more work with PHP anyway.

I'm seeing a change on github where 'efree(args);' elements have been
stripped from that file? Have compiled including them, but the patch
failed to install fully apparently due to the difference.

> However, there are some test fails, which I am not quite sure about.
http://php7.lsces.org.uk/ibtest.php is running clean except for the
final drop table which is failing safe.
I'll work through the 5 make test failures later, but suspect it will
just be reply formats.

> Anyone who is faimilar with firebird, please help
> https://gist.github.com/laruence/f3af903012902818d7da
Thanks for the expert input!

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

---

## #89880 — Lester Caine — 2015-12-23T20:41:28+00:00

URL: https://externals.io/message/89858#89880 · In reply to: #89878

> > […]
> I'll work through the 5 make test failures later, but suspect it will
> just be reply formats.

OK nothing particularly heavy on the failures. Actually it's mainly due
to the 'non-real-world' nature of the tests using combinations of
connections one should never use in practice. It is not normal practice
to create and delete new databases from any application when using
Firebird. One would normally be working with data stored long term, so
some of the problems are due to trying to delete a database that is
still being created asynchronously. The ibtest.php script works with one
of the existing demo databases so only relies on a stable link.

That said, I think there is a leak of some sort, or rather not clearing
down properly which is the error in both 004.phpt and 005.phpt

Both give an 'invalid statement handle' which did not make sense
initially since the same ibase_query() had been run before and after
without an error. The problem is where the same variable is used a
second time, after the first use has been cleared down. For example ...

004.phpt line 31 creates $q ... Line 60 reuses it without a problem, but
line 102 creates the 'invalid statement handle' warning. Changing that
handle from $q to $r moves the warning to line 112 which I've changed to
$s and the test now runs clean. ( line numbers for .php copy of test)

OK ... cross checking that it would seem that the problem is with
ibase_free_result() which I think should actually free the statement
handle? If I try an unset() before the next use, it's the unset which
gets the warning, then the actual query runs clean.

Any pointers where I should dig next? Will dig into the actual code now
I know where to start ... I think.

-- 
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
