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):
seo
2022-2-25 23:46
I really loved reading your blog. It was very well authored and easy to undertand. Unlike additional blogs I have read which are really not tht good. I also found your posts very interesting. In fact after reading, I had to go show it to my friend and he ejoyed it as well! ยาเพิ่มขนาดน้องชาย
seoo
2022-3-18 03:17
I really appreciate this wonderful post that you have provided for us. I assure this would be beneficial for most of the people. FESTIVAL GRAPHIC DESIGN
Hibbah
2022-3-31 09:45
Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with extra information? It is extremely helpful for me. panele podlogowe wyprzedaz
seo
2022-3-31 16:16
Because of this , promotional advertisements email campaigns that allows you to advantageous study sooner than offer. In other words to put in writing more practical space something like this. voyance par telephone gratuite sans attente
Hibbah
2022-4-2 18:15
Thank you for some other informative blog. Where else could I get that type of information written in such an ideal means? I have a mission that I’m just now working on, and I have been at the look out for such information. SHOPIFY WEB DESIGN
Hibbah
2022-4-10 21:42
I appreciated your work very thanks recarga jogo free fire
Hibah
2022-4-12 00:15
Your work is very good and I appreciate you and hopping for some more informative posts. Thank you for sharing great information to us. handicapmd.com
seo
2022-4-23 04:08
Nice post! This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post. trivagoKM
seo
2022-4-23 23:53
This is such a great resource that you are providing and you give it away for free. slot deposit dana
seo
2022-5-8 17:57
This is such a great resource that you are providing and you give it away for free. IRISH FAKE DRIVER'S LICENSE
DSXD
2022-5-12 23:59
Fresh orange juices are broadly preferred all internationally for diverse remarkable fitness benefits. Although, you may without problems get diverse kinds of packaged orange juices withinside the market, it's miles constantly counseled which you simplest devour freshly squeezed drink. น้ำส้มคั้นสด
alijan
2022-5-14 18:47
https://doramasflixs.nethttps://doramas-flix.net<a href="https://doramas-flix.net">doramasflix</a>En ✓ Doramasflix ✓ puedes ver Doramas y películas online gratis en español subtitulado y latino completas en HD.doramasflix
alijan
2022-5-14 18:48
https://doramasflixs.nethttps://doramas-flix.net<a href="https://doramas-flix.net">doramasflix</a>En ✓ Doramasflix ✓ puedes ver Doramas y películas online gratis en español subtitulado y latino completas en HD.doramasflix
alijan
2022-5-14 18:48
https://doramasflixs.nethttps://doramas-flix.net<a href="https://doramas-flix.net">doramasflix</a>En ✓ Doramasflix ✓ puedes ver Doramas y películas online gratis en español subtitulado y latino completas en HD.doramasflix
Christopher
2022-5-24 13:22
Download the <a href="https://apptros.com/imvu-mod-apk/ "> IMVU MOD</a> APK and enjoy chatting with people.
谷歌seo优化
2022-5-27 18:13
<a href = "https://www.tianwenwangluo.com">谷歌seo优化<a/>
seo
2022-6-11 00:20
Catering to customers worldwide successfully for nearly a decade, we specialize in procuring and shipping your requirements at the shortest time span. Further we ensure the best modes of transportation for your goods, be it sea freight, air freight or road freight. Ligaepl
seo
2022-6-13 00:18
We will always appreciate all you have done here because I know you are very concerned with our. slot paling joss
google seo
2022-6-20 15:06
打卡喽。<a href = "https://www.tianwenwangluo.com/%E8%B0%B7%E6%AD%8Cseo%E4%BC%98%E5%8C%96/">谷歌seo优化<a/>
谷歌seo
2022-6-24 11:38
Google seo: refers to the practice of continuously optimizing a website to obtain a higher ranking in the organic search results of the Google search engine.<a href = "https://www.tianwenwangluo.com/%E8%B0%B7%E6%AD%8Cseo%E4%BC%98%E5%8C%96/">谷歌seo<a/>
分页: 6/10 1 2 3 4 5 6 7 8 9 10