#47281 [Opn]: $php_errormsg is limited in size of characters
| From: | jeffersongranatto at mannesoft dot com dot br | Date: | Sun, 27 Dec 2009 17:03:05 +0000 |
| Subject: | #47281 [Opn]: $php_errormsg is limited in size of characters | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-146136@lists.php.net to get a copy of this message | ||
ID: 47281
User updated by: jeffersongranatto at mannesoft dot com dot br
Reported By: jeffersongranatto at mannesoft dot com dot br
Status: Open
-Bug Type: Feature/Change Request
+Bug Type: OCI8 related
Operating System: Linux
-PHP Version: 5.2.8
+PHP Version: 5.3.1
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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