msphpsql: [Microsoft][ODBC Driver 17 for SQL Server]Encryption not supported on the client
PHP Driver version or file name
5.8.0 (php_pdo_sqlsrv_74_nts_x86.dll)
SQL Server version
Azure SQL
Client operating system
Windows Server, using IIS/fastcgi
PHP version
7.4.9 (x86, NTS)
Microsoft ODBC Driver version
2017.175.02.01
Problem description
Our software is based on SabreDAV [1], running on Windows/IIS. When using SQLExpress as backend, everything is working fine. As soon as we start using AzureSQL, we encounter the following error from time to time. This is from the PHP error log:
[24-Aug-2020 19:17:38 UTC] Failure while creating PDO context:SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]Encryption not supported on the client.
[24-Aug-2020 19:17:38 UTC] PHP Fatal error: Uncaught PDOException: SQLSTATE[08001]: [Microsoft][ODBC Driver 17 for SQL Server]Encryption not supported on the client. in ..\web\server.php:93
We tried to narrow down the problem. Our findings so far:
- It only happens with AzureSQL, but not SQLExpress
- It doesn’t happen always, but once the php-cgi.exe process gets into this (broken) state, it will trigger the error on every request. This continues until IIS decides to recycle the php-cgi.exe process. Sometimes, the server runs a couple of days without triggering the failure, sometimes the failure happens a couple of times per day.
- Using
MultipleActiveResultSets=falsewe can mitigate this failure.
We are quite puzzled at this point and would appreciate any help in further investigating this failure.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 43 (17 by maintainers)
Hi all, ODBC Driver 17.7.2 is available for download now. Please give it a try and let us know how it goes.
Yep, this matches my experience
@lwohlhart
There is a delay between when the English docs are updated for a release and when the localized pages get updated by the localization process. I don’t know what the typical lag is, but that’s the reason for this note on the download pages:
Regards, David
For everyone who is as confused as I was: Make sure you hit the english version of the ODBC Driver download page https://docs.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver15 (in my case the german version still only offers 17.7.1)
@yitam I’ve been running our load test for a day now (with MARS enabled) and 17.7.2.1. Looking good so far! Will keep it running for another week and keep you posted. Thanks a lot @yitam !
@yitam Could you confirm that the issue has something in common with the MARS turned on and that’s why we should turn it off on production servers to mitigate? I’m asking because we need to decide if wait for ODBC final fix or apply the workaround. Thanks.
Hi @mbiebl and @ajdjackson, here is an update: we figured out a way to consistently reproduce the issue and found the underlying causes at long last. We are running different tests, including stress testing the server, to make sure the fix in the ODBC driver does not introduce regressions.
Basically only fetching:
i.e. nothing fancy
we use jmeter: https://jmeter.apache.org/