laminas / laminas-db

Database abstraction layer, SQL abstraction, result set abstraction, and RowDataGateway and TableDataGateway implementations
https://docs.laminas.dev/laminas-db/
BSD 3-Clause "New" or "Revised" License
122 stars 68 forks source link

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

Open Meister1900 opened 1 year ago

Meister1900 commented 1 year ago

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

Ocramius commented 1 year ago

Please fix - Thanks

Send a patch

Meister1900 commented 1 year ago

Please fix - Thanks

Send a patch Connection.php.zip

Ocramius commented 1 year ago

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.