Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP 7.x connection with MSSQL server with MAMP

I am trying to connect mssql server to PHP 7.0.8 through MAMP. I have tried using freetds. On some blog people are saying to use pdo_dblib.so extension but it's not working.

Please guide me through the process of connection.

like image 573
Amit Verma Avatar asked Oct 06 '16 07:10

Amit Verma


1 Answers

For those who still have this problem:

/Applications/MAMP/bin/php/php7.2.1/bin/pecl install sqlsrv pdo_sqlsrv

Edit php.ini:

extension=sqlsrv.so
extension=pdo_sqlsrv.so

If necessary, use brew install autoconf if you don't have it already.

like image 182
Pedro Santiago Avatar answered Sep 19 '22 04:09

Pedro Santiago