php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59985 No ORA-error message when OCI_NO_DATA
Submitted: 2011-10-03 07:22 UTC Modified: 2011-11-10 22:51 UTC
From: sss at rdw dot ru Assigned: sixd (profile)
Status: Closed Package: OCI8 related
PHP Version: 5.3.6 OS: linux
Private report: No CVE-ID: None
 [2011-10-03 07:22 UTC] sss at rdw dot ru
Description:
------------
When pl/sql trow exeption ORA-01403
php don't show this Warning message.




Reproduce code:
---------------
$x = '';
$conn = oci_connect("scott", "tiger", "mydb");

//ORA-01403 bad Warning message (no pl/sql trace)
$stid = oci_parse( $conn, 'Begin Select 1 Into :x From dual Where 1 = 2; End;' );
oci_bind_by_name($stid, ":x", $x);
oci_execute($stid);


//ORA-01476 good Warning message
$stid = oci_parse( $conn, 'Begin Select 1/0 Into :x From dual; End;' );
oci_bind_by_name($stid, ":x", $x);
oci_execute($stid);


Expected result:
----------------
Warning: oci_execute() [function.oci-execute]: ORA-01403: no data found ORA-06512: at line 1 in /www/docs/rdw/bootstrap.php on line 8

Warning: oci_execute() [function.oci-execute]: ORA-01476: divisor is equal to zero ORA-06512: at line 1 in /www/docs/rdw/bootstrap.php on line 13

Actual result:
--------------
Warning: oci_execute() [function.oci-execute]: OCI_NO_DATA in /www/docs/rdw/bootstrap.php on line 8

Warning: oci_execute() [function.oci-execute]: ORA-01476: divisor is equal to zero ORA-06512: at line 1 in /www/docs/rdw/bootstrap.php on line 13

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-09 23:49 UTC] sixd@php.net
-Package: oci8 +Package: OCI8 related
 [2011-11-10 22:46 UTC] sixd@php.net
Automatic comment from SVN on behalf of sixd
Revision: http://svn.php.net/viewvc/?view=revision&revision=319015
Log: OCI8: Fixed bug #59985 (show normal warning text for OCI_NO_DATA).  Sync NEWS.
 [2011-11-10 22:51 UTC] sixd@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: sixd
 [2011-11-10 22:51 UTC] sixd@php.net
The error stack was always available after calling oci_error($stid).

I've merged a change to OCI8 so the default warning now includes the error stack 
too.
 [2012-04-18 09:47 UTC] laruence@php.net
Automatic comment on behalf of sixd
Revision: http://git.php.net/?p=php-src.git;a=commit;h=a1cf0c426a919d7c87ad442276ebe67ce4983539
Log: OCI8: Fixed bug #59985 (show normal warning text for OCI_NO_DATA).  Sync NEWS.
 [2012-07-24 23:39 UTC] rasmus@php.net
Automatic comment on behalf of sixd
Revision: http://git.php.net/?p=php-src.git;a=commit;h=a1cf0c426a919d7c87ad442276ebe67ce4983539
Log: OCI8: Fixed bug #59985 (show normal warning text for OCI_NO_DATA).  Sync NEWS.
 [2013-11-17 09:35 UTC] laruence@php.net
Automatic comment on behalf of sixd
Revision: http://git.php.net/?p=php-src.git;a=commit;h=a1cf0c426a919d7c87ad442276ebe67ce4983539
Log: OCI8: Fixed bug #59985 (show normal warning text for OCI_NO_DATA).  Sync NEWS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 13:01:29 2024 UTC