|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-01-07 18:04 UTC] mikedeweese at hotmail dot com
Description:
------------
Calling ibase_query without a database link identifier crashes PHP.
In PHP5 and according to the manual, if omitted, the last opened link is assumed.
functions ibase_trans and ibase_prepare also take an optional database link id and will also crash if one is not given in php7.
Test script:
---------------
$db = ibase_connect("172.16.2.1:TESTDB", 'sysdba', 'masterkey');
$q = ibase_query("SELECT * FROM UTUSERS WHERE FUSERID = 'MJD'");
print "ok";
Expected result:
----------------
ok should print to the screen
Actual result:
--------------
A windows dialog with php icon. "CLI has stopped working. A problem caused the program to stop working correctly. Please close the program."
If I put $db as the first param, there is no crash and ok prints as expected.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 22:00:01 2025 UTC |
It is closer to working like it used to. This now works $db = ibase_connect("172.16.2.1:POEM_DEV", 'sysdba', 'masterkey'); $t = ibase_trans(); // This line crashes in the 7.0.2 $q = ibase_query($t, "SELECT FUSERID, FEMPNO FROM UTUSERS WHERE FUSERID = 'MJD'"); $r = ibase_fetch_object($q); print_r($r); but this still crashes $db = ibase_connect("172.16.2.1:TESTDB", 'sysdba', 'masterkey'); $q = ibase_query("SELECT * FROM UTUSERS WHERE FUSERID = 'MJD'"); print "at end";