php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2961 Oracle 8 error handling functions does not work
Submitted: 1999-12-12 16:06 UTC Modified: 2006-07-17 08:55 UTC
From: k_a_h_l_i_l at yahoo dot com Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 3.0.12 OS: RH Linux 6.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
15 + 12 = ?
Subscribe to this entry?

 
 [1999-12-12 16:06 UTC] k_a_h_l_i_l at yahoo dot com
Setup: RH Linux 6.0/Oracle EE 8.1.5/Apache 1.3.9/PHP 3.012
Script to reproduce problem:
---------(start code)
      $stmt = "insert into... values..."; //will raise a unique constraint violation error
      $stmt = ociparse($conn, $stmt);
      @ociexecute($stmt);
      $err1 = ocierror();
      $err2 = ocierror($stmt);
      $err3 = ocierror($conn);
      print "Error messages:<br>(1)".$err1."<br>(2)".$err2."<br>(3)".$err3."<br>";
      print "PHP error: ".$php_errormsg;
---------(end code)

This will output (when viewed in HTML browser):
---------(start output)
(1)
(2)Array
(3)
PHP error: OCIStmtExecute: ORA-00001: unique constraint (WEEZ.SYS_C00894) violated
---------(end output)

Notice that the ocierror() function is totally useless in this example. 

Other probably irrelevant info:
PHP cofigure line: configure --with-apxs=... --with-apache=... --with-oracle=... --with-xml

php.ini file: 
include_path=...
auto_prepend_file=...
track_vars = on
magic_quotes_gpc = on
sendmail_path /usr/sbin/sendmail -t
track_errors = on
short_open_tag = off
                      

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-12-28 04:58 UTC] thies at cvs dot php dot net
ocierror return an array!

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 20:01:29 2024 UTC