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) | 阅读(59009)
kissasiantv Email Homepage
2022-9-25 12:52
Kissasian - Watch Asian Dramas With English Subtitleshttps://kissasiantv.info/
doramasmp4 Email Homepage
2022-9-27 01:10
DoramasMp4you can easily watch your favorite series anytime, anywhere. Discover our categories ranging from Korean, Spanish & Asian dramas every day.
DoramasMP4 Email Homepage
2022-10-7 22:03
Just the website I was looking for. It's really awesome. I'll follow your footsteps and if you want to watch DoramasMP4 online free episods daily then visit the link below.<a href="https://dromashd.com/">Doramasmp4</a>
DoramasMP4 Email Homepage
2022-10-7 22:39
Just the website I was looking for. It's really awesome. I'll follow your footsteps and if you want to watch DoramasMP4 online free episods daily then visit the link below.<a href="https://dromashd.com/">Doramasmp4</a>
sogife Email Homepage
2022-10-8 16:27
dramacool all dramas avail on this site with english sub. i visit this today and i feel this is the best for all dramas with newest episode . also good quality graphics and sound and also easyhandling theme use in which this site for users....<a href="https://dramacool1.me">https://dramacool1.me</a>
sogife Email Homepage
2022-10-8 16:30
<a href="https://onlinedramacool.com">Dramacool</a>all dramas avail on this site with english sub. i visit this today and i feel this is the best for all dramas with newest episode . also good quality graphics and sound and also easyhandling theme use in which this site for users....<a href="https://onlinedramacool.com">https://onlinedramacool.com</a>
Dramacool Homepage
2022-10-9 17:25
这是一条隐藏评论或留言。您需要以合适的身份登入后才能看到。
dramacoolquest Email Homepage
2022-10-9 17:27
Watch Latest Shows On <a href="https://dramacool.quest/myasiantv/">Myasiantv</a>
dramacoolquest Email Homepage
2022-10-9 17:27
Watch Latest Shows On <a href="https://dramacool.quest/myasiantv/">Myasiantv</a>
dramacoolquest Email Homepage
2022-10-9 17:30
Watch Latest Shows On https://dramacool.quest/myasiantv/
Doramasflix Email Homepage
2022-10-11 01:59
Sub Español is available to watch for free and you can download high quality videos With Spanish Sub in HD gratis on Spanish Doramas Free Doramas Online see more dramas for free on Doramasflixhttps://doramasflix.lol/https://doramasflix.lol/
Box Skin Injector Email Homepage
2022-10-22 01:07
Great artivle keep it up.Box Skin InjectorStream India
doramasonline Email Homepage
2022-10-28 20:40
Ver dorama My Girlfriend Is an Alien capitulo 20 Sub Español in HD for Free. My Girlfriend Is an Alien cap 20 sub español es uno de los mejores espidoe de.https://doramasflixonline.net/https://doramasflixonline.net/
DORAMAS Email Homepage
2022-11-19 13:52
Hi, welcome to Here you can see every one of the Spanish shows in high video quality. Observe today DAMO Section 5 sub video in Spanish here on the web. Continue to watch Ver Doramas on the web, as well as Dormas Sub Español,
DRAMA Email Homepage
2022-11-19 13:54
watch doramas of many counties with best and better quality doramas , estrenosdoramas ,  doramasflix , daramacool , 9animeg , animeg , kissassian , watchasian, dramacoolsk and dramacoolskmp4
Ahmad Email Homepage
2022-11-19 14:25
material that is written really effectively. Anyone who uses it, including me, will benefit from it. Continue your wonderful work. I'll definitely check out more postings. This website appears to have a substantial number of visits. estrenosdoramas
JOHN Email Homepage
2022-11-19 14:27
content that is written very skillfully. I will get something from using it, as will everyone else. Keep up the fantastic work. I'll most certainly look at more posts. There seem to be a lot of visitors to this page. doramasflix
JABHO Email Homepage
2022-11-19 14:28
written in a really efficient manner. It will be useful to everyone who utilises it, including me. Keep up the excellent work. I'll defiantly look at further postings. It appears that a significant amount of people visit this website. daramacool
GJDERA Email Homepage
2022-11-19 14:30
information that is written very skillfully. It will be useful to me and everyone else who utilises it. Your work is fantastic; keep it up. There's little doubt that I'll look at more posts. It seems like there are a lot of people visiting this page. 9ANIME
JKLJHDB Email Homepage
2022-11-19 14:31
information that is expertly written. I'll benefit from using it, as will everyone else. Keep up the wonderful work you're doing. There's a good chance I'll read more posts. It appears that many people are viewing this page. ANIME
分页: 8/10 第一页 上页 3 4 5 6 7 8 9 10 下页 最后页
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]