Skip to content

sqlsrv and pdo_sqlsrv; use Microsoft ODBC 18 when available, support Debian Bullseye#512

Merged
mlocati merged 1 commit intomasterfrom
sqlsrv
Feb 16, 2022
Merged

sqlsrv and pdo_sqlsrv; use Microsoft ODBC 18 when available, support Debian Bullseye#512
mlocati merged 1 commit intomasterfrom
sqlsrv

Conversation

@mlocati
Copy link
Copy Markdown
Owner

@mlocati mlocati commented Feb 16, 2022

Close #432

@mlocati mlocati force-pushed the sqlsrv branch 2 times, most recently from 1e5c8ae to dbdfb4d Compare February 16, 2022 16:10
@mlocati mlocati merged commit 1be3c17 into master Feb 16, 2022
@mlocati mlocati deleted the sqlsrv branch February 16, 2022 16:31
@mvorisek
Copy link
Copy Markdown
Contributor

This fix seems to no fully replace my previous fix, see mvorisek/image-php@7311686

CI https://github.com/atk4/data/runs/5258494124
started failing after using the image with the commit above applied
https://github.com/atk4/data/runs/5259022227

MSSQL nor PHP DBAL lib unchanged

exception trace:

1) Atk4\Data\Tests\ConditionSqlTest::testBasic
Doctrine\DBAL\Exception\DriverException: An exception occurred in the driver: SQLSTATE[08001]: [Microsoft][ODBC Driver 18 for SQL Server]SSL Provider: [error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:self signed certificate]

/__w/data/data/vendor/doctrine/dbal/src/Driver/API/SQLSrv/ExceptionConverter.php:67
/__w/data/data/vendor/doctrine/dbal/src/Connection.php:1815
/__w/data/data/vendor/doctrine/dbal/src/Connection.php:1758
/__w/data/data/vendor/doctrine/dbal/src/Connection.php:344
/__w/data/data/vendor/doctrine/dbal/src/Connection.php:1532
/__w/data/data/src/Persistence/Sql/Connection.php:237
/__w/data/data/src/Persistence/Sql/Connection.php:193
/__w/data/data/src/Persistence/Sql.php:80
/__w/data/data/src/Persistence.php:55
/__w/data/data/src/Schema/TestCase.php:36
phpvfscomposer:///__w/data/data/vendor/phpunit/phpunit/phpunit:97

Caused by
Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[08001]: [Microsoft][ODBC Driver 18 for SQL Server]SSL Provider: [error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:self signed certificate]

/__w/data/data/vendor/doctrine/dbal/src/Driver/PDO/Exception.php:30
/__w/data/data/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Driver.php:48
/__w/data/data/vendor/doctrine/dbal/src/Connection.php:342
/__w/data/data/vendor/doctrine/dbal/src/Connection.php:1532
/__w/data/data/src/Persistence/Sql/Connection.php:237
/__w/data/data/src/Persistence/Sql/Connection.php:193
/__w/data/data/src/Persistence/Sql.php:80
/__w/data/data/src/Persistence.php:55
/__w/data/data/src/Schema/TestCase.php:36
phpvfscomposer:///__w/data/data/vendor/phpunit/phpunit/phpunit:97

Caused by
PDOException: SQLSTATE[08001]: [Microsoft][ODBC Driver 18 for SQL Server]SSL Provider: [error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:self signed certificate]

/__w/data/data/vendor/doctrine/dbal/src/Driver/PDO/SQLSrv/Driver.php:42
/__w/data/data/vendor/doctrine/dbal/src/Connection.php:342
/__w/data/data/vendor/doctrine/dbal/src/Connection.php:1532
/__w/data/data/src/Persistence/Sql/Connection.php:237
/__w/data/data/src/Persistence/Sql/Connection.php:193
/__w/data/data/src/Persistence/Sql.php:80
/__w/data/data/src/Persistence.php:55
/__w/data/data/src/Schema/TestCase.php:36
phpvfscomposer:///__w/data/data/vendor/phpunit/phpunit/phpunit:97

is the ODBC lib installed really 1:1 replacement or does it miss any configuration?

Comment thread install-php-extensions
# On Debian 9 and 10 we have both msodbcsql17 and msodbcsql18: let's install just one
DEBIAN_FRONTEND=noninteractive ACCEPT_EULA=Y apt-get -qy --no-install-recommends install msodbcsql18
else
DEBIAN_FRONTEND=noninteractive ACCEPT_EULA=Y apt-get -qy --no-install-recommends install '^msodbcsql[0-9]+$'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This else still installs both versions on Debian 18.

mvorisek/image-php@6bdcd5d

there should be probably no regex and only msodbcsql18 until new major release of Debian and MSSQL ODBC is out

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debian 18?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debian 11.2, a typo

abdomassoun pushed a commit to abdomassoun/docker-php-extension-installer that referenced this pull request Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing MSSQL support for Debian Bullseye/11

2 participants