#47281 [Opn->Asn]: $php_errormsg is limited in size of characters
| From: | johannes@php.net | Date: | Tue, 29 Dec 2009 14:47:11 +0000 |
| Subject: | #47281 [Opn->Asn]: $php_errormsg is limited in size of characters | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-146187@lists.php.net to get a copy of this message | ||
ID: 47281
Updated by: johannes@php.net
Reported By: jeffersongranatto at mannesoft dot com dot br
-Status: Open
+Status: Assigned
Bug Type: OCI8 related
Operating System: Linux
PHP Version: 5.3.1
-Assigned To:
+Assigned To: sixd
New Comment:
Chris, please check this.
Previous Comments:
------------------------------------------------------------------------
[2009-12-27 17:03:05] jeffersongranatto at mannesoft dot com dot br
Solution:
In ext/oci8/oci8.c, change the value of the constant PHP_OCI_ERRBUF_LEN
to 1024. It's the biggest message that Oracle can return.
------------------------------------------------------------------------
[2009-02-02 18:08:54] jeffersongranatto at mannesoft dot com dot br
Description:
------------
Sometimes, I need to show a big error message on a trigger of Oracle.
Oracle supports this type of situation, but $php_errormsg does not
display more than 500 characters.
Reproduce code:
---------------
create procedure sp_test as
begin
raise_application_error(-20000, 'more than 500 characters');
end;
$stmt = ociparse($conn, 'begin sp_test; end;');
ociexecute($stmt, OCI_DEFAULT);
echo $php_errormsg;
Expected result:
----------------
The full message.
Actual result:
--------------
The message truncated to 500 characters.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47281&edit=1