Bug #72175 [Csd]: Impossibility of creating multiple connections to Interbase with php 7.x
| From: | nikic@php.net | Date: | Mon, 25 Mar 2019 15:48:28 +0000 |
| Subject: | Bug #72175 [Csd]: Impossibility of creating multiple connections to Interbase with php 7.x | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-220170@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
Updated by: nikic@php.net
Reported by: netvicious at gmail dot com
Summary: Impossibility of creating multiple connections to
Interbase with php 7.x
Status: Closed
Type: Bug
Package: InterBase related
Operating System: Ubuntu 16.04 LTS
PHP Version: 7.x
-Assigned To:
+Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
I've now applied a much more limited version of the previous patch to 7.2 and upwards. It
should fix this issue and just this issue. The other changes should still happen, because they fix
potential use-after-free and memory leaks, but we should probably wait with those more intrusive
changes until the extension has a maintainer.
Previous Comments:
------------------------------------------------------------------------
[2019-03-25 15:44:22] nikic@php.net
Automatic comment on behalf of nikita.ppv@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=85095dfd0956bc09f5157211948c40cfa2859d27
Log: Fixed bug #72175
------------------------------------------------------------------------
[2019-03-25 07:27:25] martin dot koeditz at it-syn dot de
Hello Nikita, hello Lester
I am also working on a patch. So I thought, I inform you about this.
I will check Nikita's patch too. But looks very promising. If this works, we should check it
in.
Regards,
Martin
------------------------------------------------------------------------
[2019-03-23 15:33:23] lester at lsces dot co dot uk
I have a test running on 7.2.16 ...
http://smallbrook.co.uk:800/ibtest2.php
http://smallbrook.co.uk:800/ibtest3.php
creates a connection to a second database and then 2 to the example database ... so Resource id #3
is duplicated nicely ...
It is worth pointing out that the problem was never with creating multiple connections, but rather
with trying to start a second connection to the same database. In reality all that is required is to
simply use the existing connection, and nikita's patch neatly restores that operation under the
hood. It simply returns the existing resource handle when a duplicate database is used.
------------------------------------------------------------------------
[2019-03-22 16:19:11] nikic@php.net
Here is a possible patch against the PHP 7.3 branch: https://gist.github.com/nikic/ef81684007753232893eae7acc034196
This should resolve this issue and some of the other more blatant refcounting bugs. Because it does
so, it may also change the behavior of ibase_close to close all shared connections. I've added
a hack to avoid closing the default link, but it may be better to just make ibase_close a no-op
instead.
------------------------------------------------------------------------
[2019-01-01 19:21:39] umberto dot masotti at unich dot it
Even in the way to help maintaining, why PHP site build setup instrunctions are 5 years old?
http://it2.php.net/build-setup.php
or
https://secure.php.net/build-setup.php
To be sure, follow "Get involved" and click in the right pane "Developer Setup
Help"
The "some helpful information regarding setting up a development environment for PHP"
actually are not.
Trying to setup an Ubuntu PHP7 VM to check what can be done, but for Windows don't know if I
can in spare time.
------------------------------------------------------------------------
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