Bug #77120 [NEW]: PDO OCI doesn't probably handle OCI_SUCCESS_WITH_INFO errors

From: Date: Thu, 08 Nov 2018 03:22:35 +0000
Subject: Bug #77120 [NEW]: PDO OCI doesn't probably handle OCI_SUCCESS_WITH_INFO errors
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217861@lists.php.net to get a copy of this message
From: morozov at tut dot by Operating system: Linux PHP version: 7.2.11 Package: PDO OCI Bug Type: Bug Bug description:PDO OCI doesn't probably handle OCI_SUCCESS_WITH_INFO errors 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 bug report at https://bugs.php.net/bug.php?id=77120&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77120&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77120&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77120&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77120&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77120&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77120&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77120&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77120&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77120&r=support Expected behavior: https://bugs.php.net/fix.php?id=77120&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77120&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77120&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77120&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77120&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77120&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77120&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77120&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77120&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77120&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77120&r=mysqlcfg

« previous php.bugs (#217861) next »