Re: [PHP4BETA] How to handle Oracle Error Messsages?
| From: | David Munsey-Kano | Date: | Thu, 02 Mar 2000 21:57:15 +0000 |
| Subject: | Re: [PHP4BETA] How to handle Oracle Error Messsages? | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-11396@lists.php.net to get a copy of this message | ||
Ok, I found the php.ini settings that would eliminate the display of the
error messages on the page and the $php_errormsg is being set, so I can
use that. However, I am not having much luck with OCIError(). When I
don't supply the connection handle, it is returning zero, even though my
error log is clearly showing an Oracle generated error. When I try to
supply the connection handle, I get:
PHP Warning: Supplied argument is not a valid OCI8-Connection resource
in /dcis
/apache_bld_1.3.6/htdocs/dag/doquery.php3 on line 62
The error message in $php_errormsg is not very descriptive! I am not
even sure where it is coming from, since it does not look like an Oracle
error message at all. Sometimes it is blank, even though the php error
log file shows the problem.
HELP please!
Manuel Lemos wrote:
>
> Hello David,
>
> On 01-Mar-00 14:34:18, you wrote:
>
> >I am using the oci* interfaces of php to access Oracle. There are times
> >when I get an ugly oracle error message in my web page, such as when an
> >invalid query was used in a search dialog (I am using ConText).
>
> >How can I trap these error messages and display something friendly and
>
> OCIError() . Make sure ORACLE_HOME environment variable is set to get the
> text for the returned error number.
>
> Regards,
> Manuel Lemos
>
> Web Programming Components using PHP Classes.
> Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org
> --
> E-mail: mlemos@acm.org
> URL: http://www.mlemos.e-na.net/
> PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
> --
--
David Munsey-Kano
Dartmouth College
(603) 646-1320
Murphy was a liar, not a lawyer!