php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78421 Extension crash when no link identifier is given
Submitted: 2019-08-16 10:15 UTC Modified: 2021-03-31 11:41 UTC
From: martin dot koeditz at it-syn dot de Assigned:
Status: Suspended Package: InterBase related
PHP Version: 7.1.31 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: martin dot koeditz at it-syn dot de
New email:
PHP Version: OS:

 

 [2019-08-16 10:15 UTC] martin dot koeditz at it-syn dot de
Description:
------------
Documentation says:
If called without an argument, this function commits the default transaction of the default link.

If you use the function without default link, the script crashes.

Test script:
---------------
$dbh = ibase_connect('10.1.7.100', 'sysdba', 'masterkey');

$query = ibase_prepare($dbh, "UPDATE TBL_USER SET USER_DISPLAY_NAME = 'Koeditz, Martin' WHERE USER_ID = 125");

try {
    $transaction = ibase_trans();
    ibase_execute($query);
    ibase_commit($transaction);
}
catch(Exception $e) {
    ibase_rollback($transaction);
    die($e->getMessage());
}

echo "Everything is fine!";


Expected result:
----------------
If you have to enter a link, the documentation has to be editted.

The program should never crash if the argument is missed.

Actual result:
--------------
The script crashes.
Log output from Apache log:
[Fri Aug 16 11:41:08.021422 2019] [core:notice] [pid 17149] AH00052: child pid 21126 exit signal Segmentation fault (11)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-08-16 10:50 UTC] cmb@php.net
> If you have to enter a link, the documentation has to be
> editted.

It's not a documentation issue; rather the implementation would
have to be changed, but that would constitute a BC break.

Anyhow, this issue has basically been mentioned in the removal RFC:
<https://wiki.php.net/rfc/deprecate-and-remove-ext-interbase#what_is_broken_about_it>
 [2021-03-31 11:41 UTC] cmb@php.net
-Status: Open +Status: Suspended
 [2021-03-31 11:41 UTC] cmb@php.net
The interbase extension is moved to PECL[1] as of PHP 7.4.0, and
is looking for a new maintainer.  Until a new maintainer is found,
I suspend this ticket.

Consider to use the bundled PDO_Firebird extension, or the
php-firebird package[2] instead.

[1] <https://pecl.php.net/package/interbase>
[2] <https://github.com/FirebirdSQL/php-firebird>
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jun 19 13:01:23 2021 UTC