Re: [PHP4BETA] How to handle Oracle Error Messsages?

From: Date: Fri, 03 Mar 2000 15:18:35 +0000
Subject: Re: [PHP4BETA] How to handle Oracle Error Messsages?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-11464@lists.php.net to get a copy of this message
At one point you said that I needed to be sure that ORACLE_HOME was set to be able to get the text of the error messages. How do I get the text other than via $php_errormsg? I did see a comment in the php manual with the user contributed messages that stated that OCIError() really returns an array with a number as the first element and string as the second, but that is not working for me (I am running the php4, Beta 3). I get a parse error when I try that. And why is it complaining when I pass a valid connection handle (returned by OCILogon())? Isn't that what "conn" stands for in the documentation? Thanks for all your help. I do have some perl programming experience, but I still am not guessing the right answers yet! Manuel Lemos wrote: > > Hello David, > > On 01-Mar-00 18:23:54, you wrote: > > >I saw OCIError(), and I am checking the return values on my OCI* calls, > >but I think what is happening is that the oracle error text message gets > >sent to standard output (the web page) before the offending OCI call > >returns. > > Those are not errors, just PHP warnings. You may silence them either by lowering > the error_reporting option in php.ini or by preceeding the name of function > that issues the error by a @ character like this: $connection=@OCIPLogon(... > > >Am I missing something about how OCIError() works? > > Nah, PHP inherited some of the cryptic programming style from Perl. > Without reading throroughly the documentation or asking here as you did, > you are not expected to guess unless you are a experienced Perl programmer. > > 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!

« previous php.version4 (#11464) next »