Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to connect SqlServer2008 above PHP5.5 in Linux environment

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces the Linux environment PHP5.5 above how to connect SqlServer2008, the article is very detailed, has a certain reference value, interested friends must read it!

1. First, you need to compile and install FreeTDS.

Description: FreeTDS official website download is relatively slow, you can download it as quickly as I uploaded here: http://download.csdn.net/detail/21aspnet/8997397

# wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-patched.tar.gz

# tar-zxvf freetds-0.91.tar.gz

# cd freetds-0.91

What you need to pay attention to is here-- with-tdsver=7.1, which is very important. On the Internet, some say 7.2and some say 8.0. for questions about this, please see the reference post at the end of the article.

#. / configure-prefix=/usr/local/freetds-with-tdsver=7.1-enable-msdblib

# make & & make install

When you install it, you will see the following message:

Configure FreeTDS

# cd.. /

# echo "/ usr/local/freetds/lib/" > / etc/ld.so.conf.d/freetds.conf

# ldconfig

Verify FreeTDS

This step is very important, pass before you can continue, otherwise the following steps are meaningless.

First, take a look at the version information.

# / usr/local/freetds/bin/tsql-C

If the previous configuration-- with-tdsver=7.1 is 7.2and 8.0or anything else-- the TDS version is 5.0. see the post in the Resources below for the reason.

# / usr/local/freetds/bin/tsql-H database server IP:XXX-p 1433-U username-P password

Or directly.

# / usr/local/freetds/bin/tsql-H database server IP-p 1433-U username-P password

The above is all the contents of the article "how to connect to SqlServer2008 above PHP5.5 in Linux environment". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report