Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
MacOS install PHP Sqlsrv driver steps

Install build tools:

https://docs.microsoft.com/zh-tw/sql/connect/php/installation-tutorial-linux-mac?view=sql-server-2017#installing-the-drivers-on-macos-el-capitan-sierra-and-high-sierra

brew install autoconf automake libtool

Then install PECL:

https://jasonmccreary.me/articles/install-pear-pecl-mac-os-x//

curl -O http://pear.php.net/go-pear.phar
sudo php -d detect_unicode=0 go-pear.phar

Install sqlsrv driver

sudo pecl install sqlsrv
sudo pecl install pdo_sqlsrv

If you get make Failed error, install unixodbc first.

brew install unixodbc

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.