php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17448 if return value of oci function is OCI_SUCCESS_WITH_INFO, php assumes it error.
Submitted: 2002-05-27 03:46 UTC Modified: 2003-01-27 13:57 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: jwings at danal dot co dot kr Assigned: scohen (profile)
Status: Closed Package: OCI8 related
PHP Version: 4.2.1 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jwings at danal dot co dot kr
New email:
PHP Version: OS:

 

 [2002-05-27 03:46 UTC] 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;
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-06-20 14:41 UTC] sander@php.net
Reclassified.
 [2002-11-22 08:10 UTC] maxim@php.net
Any work/research on this one?
 [2003-01-27 11:59 UTC] 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

 [2003-01-27 13:57 UTC] 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-02-25 02:56 UTC] dpcw at gmx dot de
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 11:01:29 2024 UTC