php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30073 Exception handling not work for selectable procedures
Submitted: 2004-09-13 14:31 UTC Modified: 2005-03-03 01:00 UTC
Votes:7
Avg. Score:4.7 ± 0.5
Reproduced:6 of 6 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: almad at dracidoupe dot cz Assigned:
Status: No Feedback Package: InterBase related
PHP Version: 5.0.1 OS: Gentoo 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: almad at dracidoupe dot cz
New email:
PHP Version: OS:

 

 [2004-09-13 14:31 UTC] almad at dracidoupe dot cz
Description:
------------
When calling executable procedure, php works good, that means that ibase_query returns FALSE and IBase_Errmsg() contains code and text of exception returned by stored procedure. 

However, when calling selectable procedure ("select a, b from procedure_name"), ibase_query returns TRUE and exception is returned as unhandlingable php warning when calling ibase_fetch_row/assoc/object. 

Reproduce code:
---------------
$s = ibase_query ("select var from procedure_name");
If(!$s){
echo "FireBird returned error: ".IBase_Errmsg();
}
Else{
while($d=ibase_fetch_row($s)){
echo $d[0];
}
}

Expected result:
----------------
FireBird returned error: Some exception returned by procedure_name

Actual result:
--------------
Warning: ibase_fetch_assoc() [function.ibase-fetch-assoc]: exception 1 Some exception returned by procedure_name in /var/.../script.php on line xx

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-23 21:31 UTC] abies@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip


 [2005-03-03 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-11-13 20:42 UTC] tonne1 at s8zehn dot net
On Debian:

selectable SP does never return an error: 

test case:

create procedure test 
returns (status integer)
as
begin
  status = 1 / 0;
  suspend;
end;

calling 
select * from test 
will not raise an error.
 [2011-03-18 17:57 UTC] george dot benjamin at gmail dot com
I have the same problem, both on linux (CentOS 5.2) and on windows (Windows7) with 
interbase etension version 5.3.1.0 (php_interbase.dll/php_interbase.so).

If I use "select * from procedure_name" in ibase_query() and the procedure raises 
an exception, ibase_errmsg() and ibase_errcode() will return null instead of the 
exception message and number.
 [2011-03-23 00:13 UTC] office at hinter dot ro
Same problem here. CentOS with PHP 5.2.9
 [2014-07-14 17:59 UTC] newkipsoftware at gmail dot com
Same problem;

My php version: 5.4.6-1
Ubuntu

Compile-time Client Library Version => Firebird API version 25
Run-time Client Library Version => LI-V6.3.2.26508 Firebird 2.5

How's solve this problem ?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 21:01:27 2024 UTC