msodbcsql17 Buster
Fri, 21 Feb 2020 19:26:12 +0100
After a recent php:7.3-apache Docker image rebuild we were not able to connect to the M$SQL server anymore from our PHP application inside the docker container. Seems to be related with the Debian 9 (Stretch) --> Debian 10 (Buster) update of the official PHP base image.
The error message with the new container was:
Too lazy to find a proper solution right now, but a quick fix is to add following code to our Dockerfile:
Another lessons learned is to use the right base image tag e.g.: php:7.3-apache-stretch
The error message with the new container was:
[Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x2746
[Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection
Too lazy to find a proper solution right now, but a quick fix is to add following code to our Dockerfile:
RUN sed -i 's/SECLEVEL=2/SECLEVEL=1/g' /etc/ssl/openssl.cnf
Another lessons learned is to use the right base image tag e.g.: php:7.3-apache-stretch
This website is tracked using the Piwik analytics tool. If you do not want that your visits are logged this way you can set a cookie to prevent Piwik from tracking further visits of the site (opt-out).