Created
January 8, 2018 06:48
-
-
Save manuelgeek/11903ddd23e3ed01b7bc3c855aef25f2 to your computer and use it in GitHub Desktop.
Php 7.0 and MSSQL connection on Ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo su | |
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - | |
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list | |
exit | |
sudo apt-get update | |
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql mssql-tools unixodbc-dev | |
sudo pecl install sqlsrv | |
sudo pecl install pdo_sqlsrv | |
echo "extension=sqlsrv" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` | |
echo "extension=pdo_sqlsrv" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment