CentOS 5.4 Linux 下的 PHP(FastCGI) 需要连接相关部门的SQL Server 2000数据库,配置了扩展FreeTDS扩展。

  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

  输入以下内容:
引用
[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


  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


  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):





技术大类 » PHP/JS/Shell | 评论(196) | 引用(0) | 阅读(58252)
Indian Dramas Email Homepage
2023-3-10 01:37
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
Indian Dramas Email Homepage
2023-3-10 01:38
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
rajo Email Homepage
2023-3-22 00:35
Very great essay indeed. All people ought to read. Thank you for revealing. Espanol
drama melayu tv3 Email Homepage
2023-6-6 18:15
Tonton Drama Melayu Online Live Full Episod. Watch Malay Drama Online Free Streaming. Kepala Bergetar Tonton Live Tv3 Online https://basahjeruk.live/ .<a href="https://basahjeruk.live/">drama melayu tv3</a>
astro ria live Email Homepage
2023-6-6 18:40
Watch Tonton Melayu Drama All Latest Episod Free download, Malay Telefilem Download - Kepala Bergetar Online Today Live new Episod in hd quality, Tonton Drama Full Episod.<a href="https://dfm2utv.live/"> astro ria live </a>
dfm2u Drama Email Homepage
2023-6-8 00:25
Tonton Drama Melayu Online Live Full Episod. Watch Malay Drama Online Free Streaming. Kepala Bergetar Tonton Live Tv3 Online https://basahjeruktv.live/ .<a href="https://basahjeruktv.live/">dfm2u Drama</a>
KBergetar Email Homepage
2023-6-8 03:35
Kepala Bergetar Melayu Tonton Drama Live Malay HD Telefilem KBergetar. Dfm2u tonton live dramas at Kepala Bergetar.
먹튀검증
2023-7-27 13:07
will take a note of your site and keep checking for new information about once per week. I subscribed to your Feed as well. https://totonoliteo.com/
aaareplicatrade Email Homepage
2023-11-7 21:14
Nice post. Everyone is looking a informative and a valuable post. After reading this post I will say that this post is a very informative and valuable post. Thanks for it.  high quality replica clothing
谷歌优化 Email Homepage
2024-1-22 14:42
When you use a genuine service, you will be able to provide instructions, share materials and choose the formatting style.  How to lose weight
Kepala Bergetar Email Homepage
2024-1-23 18:47
<a href="https://myflm4uu.cam/">Kepala Bergetar</a> Tonton Malay Drama Dan Malaysian Telefilem Online Full HD.
Kolkata FF Email Homepage
2024-1-23 18:49
Kolkata Fatafat Result, <a href="https://kolkataff.vip/">Kolkata FF</a> Result, Ghosh Babu tips, Kolkata Fatafat tricks, Patti, charts, <a href="https://kolkataff.vip/">Kolkata ff online</a>,कोलकाता फटाफट,কলকাতা এফ এফ
sffdg Email Homepage
2024-1-23 18:50
Emotivci, like any advanced technology, benefits from continuous learning. Regular updates and refinements based on user interactions contribute to the ongoing improvement of the system's emotional intelligence.https://natabanu.org/
Lucky cola
2024-2-7 16:39
Discover new realms and conquer new challenges.  Lucky cola
分页: 10/10 第一页 上页 5 6 7 8 9 10 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]