子分类
  • 无子分类
linux mssql sqlserver php freetds
  • 2018-10-25发布
  • 2018-10-25修改

linux mssql sqlserver php freetds


freetds

=================

wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-1.00.9.tar.gz

./configure --prefix=/usr/local/freetds --enable-msdblib --enable-dbmfix

make && make install


=================

vim /usr/local/freetds/etc/freetds.conf


增加:

[global]

client charset = utf8


测试是否可用

TDSVER=7.0 /usr/local/freetds/bin/tsql -H 192.168.1.100 -p 1433 -U sa -P ***********

=================


cd /data/src/software/php-5.6.8/ext/mssql

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config --with-mssql=/usr/local/freetds/

make

make install


pdo mssql

=================

/data/src/software/php-5.6.8/ext/pdo_dblib

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config  --with-pdo-dblib=/usr/local/freetds