Bug #77120 [Opn->Csd]: PDO OCI doesn't probably handle OCI_SUCCESS_WITH_INFO errors

From: Date: Wed, 09 Jun 2021 20:53:22 +0000
Subject: Bug #77120 [Opn->Csd]: PDO OCI doesn't probably handle OCI_SUCCESS_WITH_INFO errors
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234319@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77120&edit=1 ID: 77120 Updated by: cmb@php.net Reported by: morozov at tut dot by Summary: PDO OCI doesn't probably handle OCI_SUCCESS_WITH_INFO errors -Status: Open +Status: Closed Type: Bug Package: PDO OCI Operating System: Linux PHP Version: 7.2.11 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Closed as https://github.com/php/php-src/commit/e496123c36107eead3981c3f0aaa1d95653d70c4. Previous Comments: ------------------------------------------------------------------------ [2018-11-08 03:22:35] 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 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77120&edit=1

« previous php.bugs (#234319) next »