PHP MS SQL Unix驱动程序

系统教程 行业动态 更新时间:2024-06-14 16:57:40
PHP MS SQL Unix驱动程序 - Microsoft或FreeTDS(PHP MS SQL Unix Driver - Microsoft or FreeTDS)

我正在运行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

更多推荐

本文发布于:2023-04-13 12:45:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/c260076e812760a2abb97b44272fcdac.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:驱动程序   MS   PHP   Unix   SQL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!