php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77120 PDO OCI doesn't probably handle OCI_SUCCESS_WITH_INFO errors
Submitted: 2018-11-08 03:22 UTC Modified: 2021-06-09 20:53 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: morozov at tut dot by Assigned: cmb (profile)
Status: Closed Package: PDO OCI
PHP Version: 7.2.11 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: morozov at tut dot by
New email:
PHP Version: OS:

 

 [2018-11-08 03:22 UTC] morozov at tut dot by
Description:
------------
The PDO OCI driver converts OCI_SUCCESS_WITH_INFO errors to exceptions which makes it impossible to connect to the server when the user's password is about to expire but is still valid.

A similar issue was fixed earlier in the oci8 extension: https://bugs.php.net/bug.php?id=31623

Create a test user in SQLPlus:

> CREATE PROFILE test_profile LIMIT PASSWORD_LIFE_TIME 0.001 PASSWORD_GRACE_TIME 0.001;
> CREATE USER bob IDENTIFIED BY password PROFILE test_profile;
> GRANT CREATE SESSION TO bob;

Run the following PHP script:

Test script:
---------------
$conn = new PDO('oci:dbname=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SID=XE)))', 'bob', 'password');

Expected result:
----------------
The connection is successfully established

Actual result:
--------------
PDOException: SQLSTATE[HY000]: OCISessionBegin: OCI_SUCCESS_WITH_INFO: ORA-28002: the password will expire within 0 days
 (ext/pdo_oci/oci_driver.c:685) in test.php on line 3

Call Stack:
    0.0001     394880   1. {main}() test.php:0
    0.0001     395176   2. PDO->__construct() test.php:3


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-06-09 20:53 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 09:01:28 2024 UTC