php 5.5 sqlserver,php-5.5.14 添加mssql模块

系统版本: centos6

php版本:php-5.5.14

[root@localhost ~]# cd php-5.5.14/ext/mssql

[root@localhost mssql]# /usr/local/php/bin/phpize

[root@localhost mssql]# ./configure --with-php-config=/usr/local/php/bin/php-config

报错:

configure: error: Cannot find FreeTDS in known installation directories

FreeTDS是一个程序库,可以实现在Linux系统下访问微软的SQL数据库!

下载TDS:

[root@localhost ~]# wget -c ftp://ftp.freetds.org/pub/freetds/stable/freetds-0.95.89.tar.gz

[root@localhost freetds-0.95.89]# ./configure --prefix=/usr/local/freetds

[root@localhost freetds-0.95.89]# make &&make install

回到php扩展mssql目录:

[root@localhost mssql]# ./configure --with-php-config=/usr/local/php/bin/php-config --with-mssql=/usr/local/freetds/

[root@localhost mssql]# make && make install

Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/

编辑php.ini载入模块

extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/"

extension = "mssql.so"

重启服务。

通过phpinfo就可以看到mssql模块了。

专注于 服务器运维与web架构

E-mail:venus#rootop.org

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值