-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow configuring oracle session mode, needed when using oracle wallet #16266
Conversation
Refer to this link for build results (access rights to CI server needed): |
I can I have this set up just need to carve out the time I was under the impression that wallet was simply called by tnsnames let me dig in with my instance today Sent from my iPhone
|
setting this as 'Developing' since there are open todos |
@butonic what shall we do this this? |
@@ -184,6 +184,11 @@ public function createConnectionParams($config) { | |||
if ($driverOptions) { | |||
$connectionParams['driverOptions'] = $driverOptions; | |||
} | |||
// allow setting oracle session mode parameter, eg OCI_CRED_EXT when using oracle wallet | |||
$sessionMode = $config->getValue('dbsessionmode', null); | |||
if ($sessionMode) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it would not make more sense if we just add a connectionParams array to our config and merge it together. Otherwise for each special wish we're adding not really tested and used option switches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wishful thinking, unfortunately. The adapters in doctrine already treat $driverOptions
(which I had hoped could be used for this) differently:
- Oracle ignores them and intead uses the
$params
array: https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Driver/OCI8/Driver.php#L44 - MySQL (PDO) uses them: https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php#L44
- PgSqL (PDO) uses them: https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php#L45
- MySQLi uses the options https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php#L62 and ultimately https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php#L214
- Sqlite (PDO) uses them, but removes
userDefinedFunctions
: https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php#L59 - SQLSrv uses it as the array used for the actual connection: https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Driver/SQLSrv/Driver.php#L44 and oltimately https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php#L55
So the correct fix IMO would be to make the doctrine oracle client aware of the $driverOptions
. A quick search did not give a good result. Something like http://www.doctrine-project.org/jira/browse/DBAL-643?jql=text%20~%20%22driveroptions%22 but for oracle.
prooved working at the customer. need to find out why I keep running into ORA-12578: TNS:wallet open failed |
Support of Linux distribution assumes, that ORACLE_HOME is hard coded in OCI extension: b) might be a upgrade / patch hell |
Solution provided by contact: LD_LIBRARY_PATH has been set system wide by creating a file in /etc/ld.so.conf.d/ with a path to ORACLE_HOME. @butonic @bboule please validate and hand over to documentation / carla |
Feedback on what exactly? The PR allows using oracle wallet as confirmed at the customer. @CaptionF gave feedback on the ORACLE_HOME setup. An I responded to the totally valid comment of @LukasReschke. The todos are still open. The question is who is going to implement them. Maybe @tariqsiddiqui ? |
|
If you want this in for 8.2 - please take action - otherwise I need to move this to 8.3 |
Hey Guys... it is important that this is in 8.2 what exactly needs to be done here? We can confirm this does indeed work what exactly would we need @tariqsiddiqui to do? |
There are 3 open tasks in the description of this pr - #16266 (comment)
Great - THX |
5f2043f
to
921edab
Compare
After talking with @butonic we decided to move this to 9.0 because this is not yet production ready. |
@karlitschek @cmonteroluque @MTRichards FYI |
@bboule FYI |
Is the upstream issue still there ? Is there a direct link or should we submit one ? |
|
We need to submit one. #16266 (comment) is the most detail we currently have. I would have to debug the problem again to fully understand why this problem exists with oracle wallet. I would have to debug the problem again to fully understand why this problem exists with oracle wallet. But I won't find the time in the next 3 weeks. |
pretty critical then - 9.0 will be in feature freeze beginning of January .... let's see |
will not be able to work on this before january |
Lucky you there will be more time for 9.0 in January 😉 |
@butonic Ping :) |
commited patch upstream: doctrine/dbal#2318 |
Pinged upstream - but this PR need to wait for 9.1 |
alternate approach as suggested by upstream is in doctrine/dbal#2325 but needs review. @MorrisJobke thx for weighing in. |
@butonic can we delete the branch? THX |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
@bboule can you test this in the lab? It seems without it oracle wallet cannot be used. In config.php set
Followup tasks:
see http://stackoverflow.com/a/11644451
cc @CaptionF