#17448 [Com]: if return value of oci function is OCI_SUCCESS_WITH_INFO, php assumes it error.
| From: | dpcw at gmx dot de | Date: | Tue, 25 Feb 2003 08:56:11 +0000 |
| Subject: | #17448 [Com]: if return value of oci function is OCI_SUCCESS_WITH_INFO, php assumes it error. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-34192@lists.php.net to get a copy of this message | ||
ID: 17448
Comment by: dpcw at gmx dot de
Reported By: jwings at danal dot co dot kr
Status: Closed
Bug Type: OCI8 related
Operating System: linux
PHP Version: 4.2.1
Assigned To: scohen
New Comment:
It isn't logical that OCI_SUCCESS_WITH_INFO is handled like an error,
because it's success_with_info, not an error.
E.g. after ocilogon no connection identifier is returned on an:
ORA-28002: the password will expire within num days
This behaviour leads to an "account locked" because the user is unable
to login and therefore unable to change his password.
So it isn't possible to work with Oracle's "grace period" setting.
Previous Comments:
------------------------------------------------------------------------
[2003-01-27 13:57:36] maxim@php.net
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
I've set OCI_SUCCESS_WITH_INFO to also print out the message within the
default empty warning. This should not break any BC and will only
visualize what the *_INFO is.
Maxim Maletsky
------------------------------------------------------------------------
[2003-01-27 11:59:54] maxim@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
Question,
Where have you seen the error "password Will Be Expired" ? The only
message known to me is:
ORA-28002: the password will expire within num days
(http://storacle.princeton.edu:9001/oracle8-doc/server.805/a58312/newch296.htm#35114)
Which is quite logical, you get a warning when it expired. Is it
exactly the message you have seen?
To continue on this bug I need:
1. Confirm the error number for the "pawword Will Be Expired" error you
refered to
2. Ways (steps) to reduplicate this behaviour.
Thanks,
Maxim Maletsky
------------------------------------------------------------------------
[2002-11-22 08:10:52] maxim@php.net
Any work/research on this one?
------------------------------------------------------------------------
[2002-06-20 14:41:11] sander@php.net
Reclassified.
------------------------------------------------------------------------
[2002-05-27 03:46:32] jwings at danal dot co dot kr
If return value of OCI function is OCI_SUCCESS_WITH_INFO, php assumes
it error. and it don't generate message about INFO. so user cannot know
what problem is.
Using php and oracle, I found OCI_SUCESS_WITH_INFO, but cannot known
what problem is. for a long time I try to know it, finally I know. It
is "password will be expired" ¤Ñ.¤Ñ;
When return value of OCI function is OCI_SUCESS_WITH_INFO,
we get specific message using OCIErrGet() function like OCI_ERROR.
so, I hope to fix that OCI_SUCCESS_WITH_INFO of following function
equals OCI_ERROR of it.
(ext/oci8/oci8.c)
static ub4
oci_error(OCIError *err_p, char *what, sword status)
{
text errbuf[512];
sb4 errcode = 0;
switch (status) {
case OCI_SUCCESS:
break;
case OCI_SUCCESS_WITH_INFO:
php_error(E_WARNING, "%s: OCI_SUCCESS_WITH_INFO",
what);
break;
case OCI_NEED_DATA:
php_error(E_WARNING, "%s: OCI_NEED_DATA", what);
break;
case OCI_NO_DATA:
php_error(E_WARNING, "%s: OCI_NO_DATA", what);
break;
case OCI_ERROR: {
TSRMLS_FETCH();
CALL_OCI(OCIErrorGet(
err_p,
(ub4)1,
NULL,
&errcode,
errbuf,
(ub4)sizeof(errbuf),
(ub4)OCI_HTYPE_ERROR));
php_error(E_WARNING, "%s: %s", what, errbuf);
break;
}
case OCI_INVALID_HANDLE:
php_error(E_WARNING, "%s: OCI_INVALID_HANDLE", what);
break;
case OCI_STILL_EXECUTING:
php_error(E_WARNING, "%s: OCI_STILL_EXECUTING", what);
break;
case OCI_CONTINUE:
php_error(E_WARNING, "%s: OCI_CONTINUE", what);
break;
default:
break;
}
return errcode;
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17448&edit=1