Bug #72175 [Com]: Impossibility of creatiing multiple connections to Interbase with php 7.0

From: Date: Mon, 26 Nov 2018 17:49:42 +0000
Subject: Bug #72175 [Com]: Impossibility of creatiing multiple connections to Interbase with php 7.0
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-218137@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72175&edit=1

 ID:                 72175
 Comment by:         netvicious at gmail dot com
 Reported by:        netvicious at gmail dot com
 Summary:            Impossibility of creatiing multiple connections to
                     Interbase with php 7.0
 Status:             Open
 Type:               Bug
 Package:            InterBase related
 Operating System:   Ubuntu 16.04 LTS
 PHP Version:        7.0.6
 Block user comment: N
 Private report:     N

 New Comment:

Interbase module seems to be abandoned. All the developers which appear on phpinfo() related with
the Interbase/firebird module are not active developers of php looking at their Linkedin accounts.

So obviously this bug won't be fixed because there it's no active developer in charge of
the interbase/firebird module.

I think the module was ported to PHP 7.0 by someon which doesn't know the previous module and
that's why it has bugs like this one.


Previous Comments:
------------------------------------------------------------------------
[2018-06-20 19:58:44] lester at lsces dot co dot uk

"It seems $conx has been closed when creating the $conx2 connection."

But if you check the manual on ibase_connect, using the same connection details results in the
existing connection just being copied. So there should be no attempt to create a new connection. I
think the older code was trying to pick up when the same link was being used, while the amended code
seems to miss that act?

Currently waiting on a clone of the php-src updating from Feb17 to current. Only another 17500
commits to go, the I can track the implemented changes.

------------------------------------------------------------------------
[2018-05-08 06:50:20] NetVicious at gmail dot com

#14039 it's related to the garbage collector. This bug it's related with the Interbase
engine which received some change on the 7.0 branch, and doesn't allows to create two different
connections to the same database at the same time.

To start working with 7.X branch you can use my workaround using a static variable for the database
connection (check my message of 2017-11-10 11:50 UTC on this page).

------------------------------------------------------------------------
[2018-05-07 19:40:32] ucijas at gmail dot com

Related To: Bug #14039

------------------------------------------------------------------------
[2018-05-07 19:39:37] ucijas at gmail dot com

I can confirm this also in CentOS 6.9 compiling 7.1.17 via github as of today:

Any sub-call to another function which also calls ibase_connect() will break the
parent-function's previous ibase connection.

I could theoretically get around it sometimes by creative SQL joins or storing in arrays, if
projects were small, but we way too much legacy code to do that, and it would ultimately spaghettify
our code anyway.

Thus -- as indicated by "us at menatwork dot de" on 2017/07/12 -- this a complete
dead-in-water deal-breaker for PHP 7+ w/Firebird and, until fixed, there really should be prominent
warnings put out (home page, changelog, release notes, and compilation script) that PHP 7+ does not
work with Firebird and not to waste folks' time.

Let me know if I can be of any help. I may be able to look at the code later, but my C++ is rusty
and I am now up against deadlines, so this keeps us at 5.6.

See also Bug #14039 (https://bugs.php.net/bug.php?id=14039). Seems to have existed for a while back
2002, as well, then was fixed, then popped up again in 2017. (Might be related?)

Thanks.

------------------------------------------------------------------------
[2017-12-04 16:17:22] buhlerax@php.net

Good afternoon,
Does anyone have any news about this bug?
I use Debian Jessie with php 7.0, 7.1 and the same situation happens.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=72175


--
Edit this bug report at https://bugs.php.net/bug.php?id=72175&edit=1


Thread (32 messages)

« previous php.bugs (#218137) next »