{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/msphpsql/issues/745","repository_url":"https://api.github.com/repos/Microsoft/msphpsql","labels_url":"https://api.github.com/repos/Microsoft/msphpsql/issues/745/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/msphpsql/issues/745/comments","events_url":"https://api.github.com/repos/Microsoft/msphpsql/issues/745/events","html_url":"https://github.com/Microsoft/msphpsql/issues/745","id":312855646,"number":745,"title":"After upgrading from pdo_sqlsrv release candidate and msodbcsql17.1: Can't open lib '/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.1.so.0.1' : file not found","user":{"login":"svoss","id":1800548,"avatar_url":"https://avatars3.githubusercontent.com/u/1800548?v=4","gravatar_id":"","url":"https://api.github.com/users/svoss","html_url":"https://github.com/svoss","followers_url":"https://api.github.com/users/svoss/followers","following_url":"https://api.github.com/users/svoss/following{/other_user}","gists_url":"https://api.github.com/users/svoss/gists{/gist_id}","starred_url":"https://api.github.com/users/svoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svoss/subscriptions","organizations_url":"https://api.github.com/users/svoss/orgs","repos_url":"https://api.github.com/users/svoss/repos","events_url":"https://api.github.com/users/svoss/events{/privacy}","received_events_url":"https://api.github.com/users/svoss/received_events","type":"User","site_admin":false},"labels":[{"id":481471887,"url":"https://api.github.com/repos/Microsoft/msphpsql/labels/Configuration","name":"Configuration","color":"F79F81","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-10T10:05:31Z","updated_at":"2018-04-13T17:36:04Z","closed_at":null,"author_association":"NONE","body":" ## Driver version or file name\r\npdo_sqlsrv 5.2.0, msodbcsql17\r\n ## SQL Server version\r\ndocker mssql image:  microsoft/mssql-server-linux:2017-latest\r\n ## Client operating system\r\nPhp docker image running debian, host machine both UBUNTU and OS X. \r\n## PHP version\r\nPHP 7.2-fpm on debian using the docker image\r\n\r\n## Microsoft ODBC Driver version\r\nMSODBCSQL 17.1.0.1 : \r\n`/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.1.so.0.1`\r\n\r\n## Problem description\r\nPreviously I was using the preview driver (pdo_)sqlsrv5.2.0RC together with the preview ODBC17.0.5 drivers from this repo to connect to mssql. My php docker file looked like this:\r\n\r\n```\r\nFROM php:7.2-fpm\r\nARG TIMEZONE\r\nRUN apt-get update && apt-get install -y freetds-bin freetds-dev freetds-common libct4 libsybdb5 libicu-dev libcurl3-dev git zlib1g-dev apt-transport-https gnupg wget\r\n\r\n# Install mssql drivers\r\nRUN apt-get install -y unixodbc-dev \r\nRUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -\r\nRUN curl https://packages.microsoft.com/config/debian/8/prod.list > /etc/apt/sources.list.d/mssql-release.list\r\nRUN apt-get update\r\nRUN ACCEPT_EULA=Y apt-get install -y msodbcsql\r\nRUN yes | apt-get purge -y msodbcsql\r\nRUN wget https://github.com/Microsoft/msphpsql/raw/dev/ODBC%2017%20binaries%20preview/Debian%209/msodbcsql_17.0.0.5-1_amd64.deb\r\nRUN wget https://github.com/Microsoft/msphpsql/raw/dev/ODBC%2017%20binaries%20preview/Debian%209//mssql-tools_17.0.0.5-1_amd64.deb\r\nRUN ACCEPT_EULA=Y dpkg -i msodbcsql_17.0.0.5-1_amd64.deb\r\nRUN ACCEPT_EULA=Y dpkg -i mssql-tools_17.0.0.5-1_amd64.deb\r\nRUN ln -fsv /opt/mssql-tools/bin/* /usr/bin\r\nRUN pecl install sqlsrv\r\nRUN pecl install pdo_sqlsrv-5.2.0RC1\r\nRUN docker-php-ext-enable sqlsrv pdo_sqlsrv\r\n```\r\nAnd i was able to connect to mssql from php. However since recently the preview binaries have been removed from this repository and the pdo_sqlsrv version seem to have been updated to a stable version. I decided to upgrade to (pdo)_sqlsrv 5.2 and msodbc 17.1.0.1 by changing my dockerfile to:\r\n\r\n```\r\nFROM php:7.2-fpm\r\nARG TIMEZONE\r\nRUN apt-get update && apt-get install -y freetds-bin freetds-dev freetds-common libct4 libsybdb5 libicu-dev libcurl3-dev git zlib1g-dev apt-transport-https gnupg wget\r\n\r\n# Install mssql drivers\r\nRUN apt-get install -y unixodbc-dev\r\nRUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -\r\nRUN curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list\r\nRUN apt-get update\r\nRUN apt-get upgrade\r\nRUN export DEBIAN_FRONTEND=noninteractive && ACCEPT_EULA=Y apt-get install -y msodbcsql17 mssql-tools\r\nRUN ln -fsv /opt/mssql-tools/bin/* /usr/bin\r\nRUN pecl install sqlsrv\r\nRUN pecl install pdo_sqlsrv-5.2.0\r\nRUN docker-php-ext-enable sqlsrv pdo_sqlsrv\r\n```\r\nAfter rebuilding the docker image I get the php exception message:\r\n```\r\nCan't open lib '/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.1.so.0.1' : file not found\r\n```\r\nThe file however seems to exist (if i run `ls /opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.1.so.0.1` it returns the file name). Some how (pdo_) sqsrv 5.2.0 seems to not work with the msodbc sql 17.1.0.1 drivers? Any ideas how to fix this?\r\n\r\nThanks a lot.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/msphpsql/issues/comments/381208717","html_url":"https://github.com/Microsoft/msphpsql/issues/745#issuecomment-381208717","issue_url":"https://api.github.com/repos/Microsoft/msphpsql/issues/745","id":381208717,"user":{"login":"singhkays","id":6164178,"avatar_url":"https://avatars3.githubusercontent.com/u/6164178?v=4","gravatar_id":"","url":"https://api.github.com/users/singhkays","html_url":"https://github.com/singhkays","followers_url":"https://api.github.com/users/singhkays/followers","following_url":"https://api.github.com/users/singhkays/following{/other_user}","gists_url":"https://api.github.com/users/singhkays/gists{/gist_id}","starred_url":"https://api.github.com/users/singhkays/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/singhkays/subscriptions","organizations_url":"https://api.github.com/users/singhkays/orgs","repos_url":"https://api.github.com/users/singhkays/repos","events_url":"https://api.github.com/users/singhkays/events{/privacy}","received_events_url":"https://api.github.com/users/singhkays/received_events","type":"User","site_admin":false},"created_at":"2018-04-13T17:36:04Z","updated_at":"2018-04-13T17:36:04Z","author_association":"NONE","body":"@yitam I'm trying to get the latest 17.1 ODBC drivers installed in a docker container and getting the same error message. Any ideas on how to fix? \r\n\r\nI'm using the following docker build file \r\n\r\n```\r\n<ommitted for brevity but it's a Debian 9 based container image>\r\n...\r\n...\r\nRUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list\r\nRUN apt-get install -y apt-transport-https unixodbc-dev g++\r\nRUN pip install pyodbc\r\n\r\nRUN apt-get update\r\nRUN ACCEPT_EULA=Y apt-get install -y msodbcsql17\r\n```"}}
{"actor":{"display_login":"singhkays"}}