Skip to content
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

pdo_sqlsrv driver_options are passed to pdo options instead of dsn #263

Open
Meister1900 opened this issue Nov 23, 2022 · 3 comments
Open
Labels
Bug Something isn't working

Comments

@Meister1900
Copy link

Meister1900 commented Nov 23, 2022

When using pdo_sqlsrv adapter there is no possibility to pass driver_options like MultiSubnetFailover=yes that have to be part of the the dsn.
Instead, driver_options and options key in config are both passed as pdo options.
It works when using sqlsrv or setting the whole dsn string manually.

Driver options must always be part of the connection string and are NOT pdo options, see:
https://learn.microsoft.com/en-us/sql/connect/php/php-driver-for-sql-server-support-for-high-availability-disaster-recovery?view=sql-server-ver16#transparent-network-ip-resolution-tnir

Please fix - Thanks

@Meister1900 Meister1900 added the Bug Something isn't working label Nov 23, 2022
@Ocramius
Copy link
Member

Please fix - Thanks

Send a patch

@Meister1900
Copy link
Author

Please fix - Thanks

Send a patch
Connection.php.zip

@Ocramius
Copy link
Member

Hey @Meister1900, check this for how to send pull requests: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request

Beware that patches to laminas/ require accompanying automated tests in order to be considered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants