PHP 7.x与带有MAMP的MSSQL服务器的连接 [英] PHP 7.x connection with MSSQL server with MAMP

查看:82
本文介绍了PHP 7.x与带有MAMP的MSSQL服务器的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过MAMP将mssql服务器连接到PHP 7.0.8.我试过使用freetds.在某些博客上,人们说要使用pdo_dblib.so扩展名,但不能正常工作.

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.

推荐答案

对于仍然存在此问题的人:

For those who still have this problem:

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

编辑php.ini:

extension=sqlsrv.so
extension=pdo_sqlsrv.so

如果有必要,请使用brew install autoconf.

这篇关于PHP 7.x与带有MAMP的MSSQL服务器的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆