Install and configure freetds-connect to msssql in Linux
Connecting to MSSQL in Linux is very painful because Microsoft does not provide any interfaces to developers. They think that MSSQL is only a Windows operating system. Fortunately, MSSQL is
I recently used C ++ in Linux to connect to SQL Server 2005 in windows, so I had to use freetds.
Environment: System ubuntu9.04 kernel 2.6.28 GCC 4.3.3 freetds 0.91
Freetds's latest stable version is 0.91, this can download http://www.freetds.org/on
In the case of php5.3, The dblib driver of pdo cannot connect to mssql. According to the official description, 5.2 has modified this bug, but 5.3 does not. You can use the mssql function provided by php.
In the case of php5.3, The dblib driver of
php5.3 case, with PDO Dblib driver can not connect MSSQL, according to the official description, 5.2 has modified this bug,5.3 No.It is possible to use the MSSQL function that comes with PHP. Compile the Freetds,php_mssql,pdo_dblib parameters as
I mainly refer to the official articles Some points to be aware of 1, compile FreeTDS (need to download), please add--prefix= installation directory--with-tdsver=7.1//This must be over 7.0 from official documents
1. Install unixodbc
Use yum for installation:
Linux uses a CD to build a local Yum Server
Http://blog.csdn.net/tianlesoftware/article/details/7302358
[Root @ Rac1 MNT] # Yum install unixodbc
[Root @ Rac1 MNT] # Yum install unixodbc-devel
Run
Linux version: 64-bit CentOS 6.4Nginx Version: nginx1.8.0PHP Version: php5.5.28SQL Server version: 2008FreeTDS version: 0.95For Linux environment Installation nginx+php reference Linux environment Nginx installation and debugging as well as PHP
Linux version: 64-bit CentOS 6.4Nginx Version: nginx1.8.0PHP Version: php5.5.28SQL Server version: 2008FreeTDS version: 0.95For Linux environment Installation nginx+php reference Linux environment Nginx installation and debugging as well as PHP
Preface:After changing my work, I have been busy with the LINUX system architecture, and I have never been too familiar with myself. In the course of work, Baidu has always been the preferred search engine. But later, I had to and eventually used
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.