CentOS 5.4 Linux 下的 PHP(FastCGI) 需要连接相关部门的SQL Server 2000数据库,配置了扩展FreeTDS扩展。
1、编译安装FreeTDS
输入以下内容:
2、编译安装PHP自带MSSQL扩展
进入本地已存在的php-5.2.XX源码包目录:
3、在php.ini配置文件中增加mssql.so
增加一行:
4、重启PHP FastCGI
5、测试文件(test_mssql.php):


1、编译安装FreeTDS
mkdir -p /data0/software/
cd /data0/software/
wget ftp://ftp.ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz
tar zxvf freetds-stable.tgz
cd freetds-0.82/
./configure --prefix=/usr/local/webserver/freetds --with-tdsver=8.0 --enable-msdblib
make && make install
cd ../
echo "/usr/local/webserver/freetds/lib/" > /etc/ld.so.conf.d/freetds.conf
ln -s /usr/local/webserver/freetds/lib/libsybdb.so.5.0.0 /usr/local/webserver/freetds/lib/libsybdb.so.4
/sbin/ldconfig
rm -f /usr/local/webserver/freetds/etc/freetds.conf
vi /usr/local/webserver/freetds/etc/freetds.conf
cd /data0/software/
wget ftp://ftp.ibiblio.org/pub/Linux/ALPHA/freetds/stable/freetds-stable.tgz
tar zxvf freetds-stable.tgz
cd freetds-0.82/
./configure --prefix=/usr/local/webserver/freetds --with-tdsver=8.0 --enable-msdblib
make && make install
cd ../
echo "/usr/local/webserver/freetds/lib/" > /etc/ld.so.conf.d/freetds.conf
ln -s /usr/local/webserver/freetds/lib/libsybdb.so.5.0.0 /usr/local/webserver/freetds/lib/libsybdb.so.4
/sbin/ldconfig
rm -f /usr/local/webserver/freetds/etc/freetds.conf
vi /usr/local/webserver/freetds/etc/freetds.conf
输入以下内容:
引用
[global]
# TDS protocol version
; tds version = 4.2
# Whether to write a TDSDUMP file for diagnostic purposes
# (setting this to /tmp is insecure on a multi-user system)
; dump file = /tmp/freetds.log
; debug flags = 0xffff
# Command and connection timeouts
; timeout = 10
; connect timeout = 10
# If you get out-of-memory errors, it may mean that your client
# is trying to allocate a huge buffer for a TEXT field.
# Try setting 'text size' to a more reasonable limit
text size = 64512
host = mssql.yourdomain.com
port = 1433
tds version = 8.0
client charset = UTF-8
# TDS protocol version
; tds version = 4.2
# Whether to write a TDSDUMP file for diagnostic purposes
# (setting this to /tmp is insecure on a multi-user system)
; dump file = /tmp/freetds.log
; debug flags = 0xffff
# Command and connection timeouts
; timeout = 10
; connect timeout = 10
# If you get out-of-memory errors, it may mean that your client
# is trying to allocate a huge buffer for a TEXT field.
# Try setting 'text size' to a more reasonable limit
text size = 64512
host = mssql.yourdomain.com
port = 1433
tds version = 8.0
client charset = UTF-8
2、编译安装PHP自带MSSQL扩展
进入本地已存在的php-5.2.XX源码包目录:
cd /data0/software/php-5.2.XX/ext/mssql/
/usr/local/webserver/php/bin/phpize
./configure --with-php-config=/usr/local/webserver/php/bin/php-config --with-mssql=/usr/local/webserver/freetds/
make && make install
/usr/local/webserver/php/bin/phpize
./configure --with-php-config=/usr/local/webserver/php/bin/php-config --with-mssql=/usr/local/webserver/freetds/
make && make install
3、在php.ini配置文件中增加mssql.so
vi /usr/local/webserver/php/etc/php.ini
增加一行:
引用
extension = "mssql.so"
4、重启PHP FastCGI
/usr/local/webserver/php/sbin/php-fpm restart
5、测试文件(test_mssql.php):


JKLJHDB


2022-11-19 14:32
information that has been written with great expertise. It will be beneficial to both me and everyone else who uses it. Maintain the excellent work you're doing. There's a good chance I'll check out more comments. This page appears to be being viewed by a large number of people. DRamacool
NBIODH


2022-11-19 14:36
written with a high level of expertise information. It will be helpful to everyone who utilises it, including me. Keep up the wonderful work you're doing. It's likely that I'll read more comments. It looks like lots of people are looking at this page. DRAMACOOL
BDHS

2022-11-19 14:39
I'm awestruck. I doubt I've ever encountered somebody with your level of expertise in this area. You are incredibly intelligent and well-informed. You made the issue interesting for everyone by writing something that readers could grasp. Really wonderful blog you have here. DRAMACOOL
CSSDHLKH


2022-11-19 14:40
I'm astonished. Nobody I've ever met seems to have as much expertise in this area as you do. You have excellent knowledge and are highly intelligent. Everyone could comprehend what you wrote, and you kept the topic interesting for everyone. What a wonderful blog you have here. KISSASIAN
ASDJH


2022-11-19 14:42
I'm in shock. No one I've ever met seems to be as knowledgeable about this subject as you are. You are extremely intelligent and have amazing knowledge. Everyone could understand what you wrote, and you managed to keep the subject engaging. You have a fantastic blog right here. Watchasian
Rose Roberson

2022-11-22 15:27
I love dino game
myasiantv


2022-11-22 16:05
Thanks for the nice post I just shared. <strong><a href="https://kissasians.de/">kissasian</a></strong>
myasiantv


2022-11-22 16:06
Thanks for the nice post I just shared. <strong><a href="https://kissasians.de/">kissasian</a></strong>
ava121


2022-11-26 15:22
great work and thanks for sharing such a great work.getmyoffer.capitalone.com
ava121


2022-11-26 15:22
mybalancenow.comwww.doubleyourline.com
ava121


2022-11-26 15:23
getmyoffer capital one code numberindigoapply.comgetmyoffer.capitalone.com - scan application
myasiantv


2022-12-6 18:17
<a href="https://myasiantv.wiki/">MyAsianTv</a> is the best platform offering you a good selection of dramas and kshow. Like <a href="https://myasiantv.wiki/">Korean Drama</a>, Chinese Drama, <a href="https://myasiantv.wiki/schedule/">Thailand Drama</a>, and Other Asian Dramas Free Online in high Quality with English Subbed.
janikhan


2022-12-20 18:10
Novela TV | Assista Suas Novelas favoritas onlineAssista suas novelas favoritas online. Capitulos atalizados diariamente
EVSE Manufacturer

2023-1-12 14:08
You need more than just a single EVSE ( Electric Vehicle Supply Equipment ) product, you need a veteran EVSE supplier who has been in the field for many years to build your brand and grow your profits. Let evseODM help you customize EVSE and achieve business success.
Kepalbergetarfun

2023-2-16 22:32
<a href="https://kepalabergetarfun.com/">Kepala Bergetar</a> Tonton Malay Drama Dan Download Live Malay Telefilem. Kbergetar Tonton Online Melayu Live Episod Drama Video.
doramasvip


2023-2-17 19:08
I wish more writers of this kind of content would put in the effort and time that you took to thoroughly research and compose your piece. Your intellect and perspective have really impressed me. doramasvip
WATCHASIAN


2023-2-17 19:11
I wish other writers of this kind of content would put the same amount of effort and time into their research and writing as you did. Your intelligence and discernment really stand out to me. dramacool
DORAMASQUEEN


2023-2-17 19:13
There are better comments and many useful information I got from here doramasmp4
kissasian


2023-2-17 19:17
I found a lot of helpful information and great comments here. Kissasian
Indian Dramas


2023-3-10 01:36
Here We offers a collection of Indian TV shows, and web series. Now you Can Watch Papulor Drama <a href="https://ww7.bahutpyarkartehain.net/teri-meri-dooriyan-9th-march-2023-episode-64/" rel="dofollow"><strong>Teri Meri Dooriyan</strong></a> Full Episode HD 1080
分页: 9/10
4 5 6 7 8 9 10



