Subject | php 7.3 ibase_connect bug #72175 |
---|---|
Author | |
Post date | 2018-12-30T14:34:39Z |
Hi
migrated to php 7.3 and thoroughly tested the Firebird extension,
looking good. The only issue I found is this
https://bugs.php.net/bug.php?id=72175
Due to this bug, a previous connection handle to the same database is
invalidated. Even worse, regardless of scope.
Examples:
1.
$conn = ibase_connect($alias, $usr, $pw, $charset, 0, 3, $role);
$conn2 = ibase_connect($alias, $usr, $pw, $charset, 0, 3, $role);
// use $conn ... crash
2.
$conn = ibase_connect($alias, $usr, $pw, $charset, 0, 3, $role);
do_some_admin_task();
// use $conn ... crash
function do_some_admin_task () {
// connect as admin
...
$conn2 = ibase_connect($alias, $usr, $pw, $charset, 0, 3, $role);
}
In both scenarios $conn is invalid after the second connect:
supplied resource is not a valid Firebird/InterBase link resource
ibase_connect must not close or invalidate any previous connection
handle, this should only happen with ibase_close.
The only workaround is to define more than one alias for the same
database to trick ibase_connect. But that creates all sort of other
problems, doesn't scale and prevents from writing modular code.
I'm happy to test bugfixes. ibase_connect has worked until php 7.0.3.
Volker
migrated to php 7.3 and thoroughly tested the Firebird extension,
looking good. The only issue I found is this
https://bugs.php.net/bug.php?id=72175
Due to this bug, a previous connection handle to the same database is
invalidated. Even worse, regardless of scope.
Examples:
1.
$conn = ibase_connect($alias, $usr, $pw, $charset, 0, 3, $role);
$conn2 = ibase_connect($alias, $usr, $pw, $charset, 0, 3, $role);
// use $conn ... crash
2.
$conn = ibase_connect($alias, $usr, $pw, $charset, 0, 3, $role);
do_some_admin_task();
// use $conn ... crash
function do_some_admin_task () {
// connect as admin
...
$conn2 = ibase_connect($alias, $usr, $pw, $charset, 0, 3, $role);
}
In both scenarios $conn is invalid after the second connect:
supplied resource is not a valid Firebird/InterBase link resource
ibase_connect must not close or invalidate any previous connection
handle, this should only happen with ibase_close.
The only workaround is to define more than one alias for the same
database to trick ibase_connect. But that creates all sort of other
problems, doesn't scale and prevents from writing modular code.
I'm happy to test bugfixes. ibase_connect has worked until php 7.0.3.
Volker