我正在运行LAMP服务器,但现在需要连接到MS SQL(客户端请求)。 我听说微软有一个驱动程序,但无法验证是否
有谁知道Microsoft驱动程序是否可用于Unix? 如果没有,我应该坚持使用FreeTDS吗? 这似乎是PHP推荐的,但是安装文档似乎缺乏。 任何方向都会受到高度赞赏。
很抱歉一般的问题,我不熟悉设置PHP驱动程序。
UPDATE
我只是从LAMP服务器运行内联网,但需要连接到外部MS SQL DB服务器上的数据源(当然是Windows)。 我正在运行PHP5。
I am running a LAMP server but now need to connect to MS SQL (client request). I have heard Microsoft has a driver, but can't verify if
Does anyone know if the Microsoft driver is available for Unix? If not, should I just stick with FreeTDS? This appears to be recommended by PHP, however install documentation seems lacking. Any direction on either would be greatly appreciated.
Sorry for the general question, I am not familiar with setting up PHP drivers.
UPDATE
Just for some back story, I am running an intranet from the LAMP server but needs to connect to a datasource on an external MS SQL DB Server (Windows of course). I am running PHP5.
最满意答案
FreeTDS很好,运行良好。 Microsoft驱动程序仅适用于Windows,因此您无法在Linux服务器上使用它。
首先安装FreeTDS,然后使用--with-mssql=/prefix/used/for/freetds配置PHP。 如果你正在使用你的发行版的PHP,我确信有一个MS-SQL驱动程序包已经预编译并且可以安装(在Ubuntu中,那就是php5-sybase)。
然后使用PHP的mssql_ *函数来实际完成工作
FreeTDS is fine and works well enough. The Microsoft driver is Windows only, thus you wouldn't be able to use it on your Linux server.
First install FreeTDS and then configure PHP with --with-mssql=/prefix/used/for/freetds. If you are using your distribution's PHP, I'm sure there is a MS-SQL driver package already precompiled and available for installation (in Ubuntu, that'd be php5-sybase).
Then use PHP's mssql_* functions to actually do the work
更多推荐
发布评论