Using PHP 5.5.9 with PDO_OCI, Oracle 12.1. I'm getting an OCI_SUCCESS_WITH_INFO message that the password will expire soon. However, since it is thrown as an exception by PDO, the connection is not being established. How can I ignore the exception when it is just a warning or informational message?
Here is the error message:
Database Connection failed: SQLSTATE[HY000]: OCISessionBegin: OCI_SUCCESS_WITH_INFO: ORA-28002: the password will expire within 41 days
Followed by:
Fatal error: Call to a member function setAttribute() on a non-object in /htdocs/ciatools_dev/promise/Classes/PromiseVars.php on line 257
And the code that produces it:
try {
$this->dbconn = new PDO("oci:dbname=$dbwc",'username', 'password');
} catch (PDOException $e) {
echo 'Database Connection failed: ' . $e->getMessage();
}
$this->dbconn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);