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) | 阅读(59498)
turkishsub Email Homepage
2022-1-16 18:06
Watch Turkish Series with English Subtitles Free Download<a href="https://turkishsub.co/">promix tv</a>
turkishsub Email Homepage
2022-1-16 18:27
Watch Turkish Series with English Subtitles Free Download<a href="https://turkishsub.co/">sen cal kapimi</a>
MKJO Email
2022-1-17 13:20
This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here keep up the good work  buy explainer video
JKOM Email
2022-1-17 16:11
In a country of more than a billion people translation services are important. There are a few good programmes that are able to convert the Hindi language to English phonetically. One such programme converting  Hindi to English
Hibbah Email
2022-1-20 12:48
Ellevet CBD Products: How Many Are They?A wide variety of Ellevet CBD products are available to assist your dog or cat regain mobility and comfort in a short amount of time, including the following:1. Ellevet For Cats (The Only Ellevet Item For Cat),2. Ellevet Calm And Comfort Chews,3. Ellevet Mobility Oil For Dogs (also known as Ellevet CBD Oil For Dogs),4. Ellevet Soft Gels,5. Ellevet Mobility Chews For Dogs (also known as CBD Chews For Dogs)
Hibbah Email
2022-1-21 14:27
Remarkable article, it is particularly useful! I quietly began in this, and I'm becoming more acquainted with it better! Delights, keep doing more and extra impressive!  https://roarkesoftware.com/telldunkin/
seriale turcesti Email Homepage
2022-1-22 19:43
Comunitatea pasionatilor de seriale turcesti. seriale traduse biografia actorilor vidioclipuri fotografi. https://serialeonline.su Bine ați venit pe . See more of filme online gratis subtritrate in romana on facebook. . youtube seriale turcesti traduse in limba romana Pretul dragostei, este un serial Us .https://serialeshd.com/https://serialeonline.suhttps://serialeonline.su
seriale turcesti Email Homepage
2022-1-22 20:58
Comunitatea pasionatilor de seriale turcesti. seriale traduse biografia actorilor vidioclipuri fotografi. https://serialeonline.su Bine ați venit pe . See more of filme online gratis subtritrate in romana on facebook. . youtube seriale turcesti traduse in limba romana Pretul dragostei, este un serial Us .https://serialeshd.com/https://serialeshd.com/https://serialeonline.su
hibbah Email
2022-1-24 14:47
I havent any word to appreciate this post.....Really i am impressed from this post....the person who create this post it was a great human..thanks for shared this with us.   https://m.youtube.com/watch?v=7yOofsAWZRg
Hibbah Email
2022-1-25 14:11
Free Khmer Classifieds at KhmerAds.co | Buy Cheap Houses and Land in CambodiaKhmerAds provides free listings of items in all provinces within Cambodia. There are lots of houses for rent and sales in Phnom Penh & Sihanouk ville. It's the best site to buy cheap land in Cambodia  apartment for rent in sihanoukville
Hibbah Email
2022-1-25 19:09
Buy A Stripe account is a much more similar to a bank account. When you have a website and want to receive the payments from your clients by cards, you need a stripe account. When you set up stripe function with your website your client can pay you using their credit & debit card. Buy our verified stripe account which is very easy to use.  Buy Stripe Account
RSK Email
2022-1-30 10:39
When you use a genuine service, you will be able to provide instructions, share materials and choose the formatting style.  How to lose weight
Hibbah Email
2022-1-30 19:03
Interesting topic for a blog. I have been searching the Internet for fun and came upon your website. Fabulous post. Thanks a ton for sharing your knowledge! It is great to see that some people still put in an effort into managing their websites. I'll be sure to check back again real soon.  Vital Alpha Testo Canada
Hibbah Email
2022-2-3 10:10
We can supply and deliver specialist medical outfit and medical bias to patient homes. Our nursers will set up clinical outfit to make it easier for individualities to pierce and administer their own specifics at home.  Delivering medicines and equipment
AMKN Email
2022-2-3 13:41
Heating repair contractor from Stockbridge talks about why electric and gas heat bills are increasing for Americans.  <a href="https://tinyurl.com/why-electric-utilities">Go here</a>  Go here
Hibbah Email
2022-2-4 22:19
The further backlinks a website has, the further popular it is. Since all hunt machines want to give a superior end stoner experience, they will give advanced rankings to websites or webpages with numerous backlinks meaning that a SEO strategy should correspond of a veritably good backlink structure strategy.  buy backlink
Hibbah Email
2022-2-6 15:03
That appears to be excellent however i am still not too sure that I like it. At any rate will look far more into it and decide personally!  como funciona o cartao de todos
Hibbah Email
2022-2-10 20:30
Google SEO教程,88个谷歌SEO优化实用技巧 你好,在网站管理工具中显示我的网站有45000+索引无法找到,请问该怎么办,请给我一个解决方案。万分感谢!  谷歌SEO in google.com
Hibbah Email
2022-2-15 23:07
I found this is an informative and interesting post so i think so it is very useful and knowledgeable. I would like to thank you for the efforts you have made in writing this article.  usernames good tiktok names
JAKO Email
2022-2-16 13:44
Someone Sometimes with visits your blog regularly and recommended it in my experience to read as well. The way of writing is excellent and also the content is top-notch.  Thanks for that insight you provide the readers!   dmv handicap parking permit
分页: 5/10 第一页 上页 1 2 3 4 5 6 7 8 9 10 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]