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 | 评论(197) | 引用(0) | 阅读(59830)
Steven Email Homepage
2015-3-19 02:32
Thank you for this post Weight Loss Tea
aaa Email Homepage
2015-3-19 02:33
aaaaaa
Steven Email Homepage
2015-3-20 22:18
Word Game online Email Homepage
2019-7-1 12:28
It's easy to understand, detailed and meticulous! I had a lot of posts. after watching this article from you! I feel it's interesting, your article gave me a new perspective! I have many other articles on the same topic, but your article convinced me!fnaf world
Stella
2019-7-5 14:10
I like viewing web sites which comprehend the price of delivering the excellent useful resource free of charge. I truly adored reading your posting. Thank you!  bubble shooter
treasurebox Email Homepage
2020-1-31 17:29
Thanks for updating this. Buy all the household and garden items online in Auckland Newzealand in a single click. Body Pillow Nz and all the items you will be buy online.https://www.treasurebox.co.nz/new-arrival.html
simpson joshua Email Homepage
2020-2-17 15:11
Looking at the round balls with bright colors you will see they are great. More amazing when you directly participate in this exciting bubble game.Bubble Shooter
manuka honey for diabetic ulcer Homepage
2020-3-20 16:55
recommended further research to confirm that honey can be used as the first line of treatment for these types of wounds.manuka honey for diabetic ulcer/
昵称 Homepage
2020-3-30 13:04
Thank you for the useful information, I won’t be able to understand without your clear description. I really appreciate that I have also followed you to get informed on your next post.<a href="https://minecraftmodspc.com/">minecraft mods pc</a>
bubbleshort1 Email Homepage
2020-4-9 06:37
Such nice information! I was searching on search engine and came across your blog post, after reading the full article feel well.  Thanks for sharing this kind of article in this forum, please keep sharing more post like this. Also, I bookmarked this webpage for getting any further info. Bubble Shooter
dinshakes123 Email Homepage
2020-4-24 15:45
bubble games are the best reliever in the time of boredom and give happiness to the game lovers.
goodjob
2020-4-26 03:45
Such an awesome and great post. Really enjoyed reading the whole thing. Thanks a bunch :)https://myutilitykilt.com/do-irish-people-wear-kilts/
shoesformen
2020-4-28 13:00
Shoesformen.com is a professional E-commerce platform focused on men shoes,we sale the most Cost-effective and various styles for men shoes,we sale quality men dress shoes mostly and you can find the best men shoes for you.Shoes For Men the website which focus on men's fashion and give the best price of shoes.Men's fashion,our passion.https://www.shoesformen.com
duytruongmmo2
2020-5-18 15:55
Thank you for the useful information, I won’t be able to understand without your clear description. I really appreciate that I have also followed you to get informed on your next post.bestgames4pc
recipestrack Email Homepage
2020-5-20 05:14
Thanks for this helpful information as always !regards,https://www.recipestrack.com/
coca Homepage
2020-8-27 18:17
I enjoyed reading your blog post. Your blog has good information, I have a good idea from this great blog. I am always looking for this type of blog post. Thanks for sharing!bubble shooter
Ben johnson Email
2021-5-17 22:29
I like viewing web sites which comprehend the price of delivering the  excellent useful resource free of charge. I truly adored reading your posting.https://vindousis-gadayeneba.ge/
down or not Email Homepage
2021-8-10 20:18
I like viewing web sites which comprehend the <a href="https://www.downstatuscheck.com/">down or not</a> price of delivering the  excellent useful resource free of charge. I truly adored reading your posting.https://vindousis-gadayeneba.ge/
balaj Email
2021-8-15 15:37
Hello, welcome to  Here you can see all the Spanish dramas in high video quality. Watch today DAMO Chapter 5 sub video in Spanish here online. Keep watching Ver Doramas online, as well as Dormas Sub Español, right here.Vicky Doramas 2021
分页: 3/10 第一页 上页 1 2 3 4 5 6 7 8 9 10 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]