PHP Connection SQL Server method database development Software Database Foundation Learning Database Repair

Source: Internet
Author: User
Tags microsoft drivers for php for sql server
1. Download Microsoft Drivers for PHP for SQL Server expansion pack It's divided into versions 2.0 and 3.0.

This. (I am using the 2.0 version)

This expansion pack is required for the computer's operating system, and the corresponding system uses the corresponding version.

Operating Systems supported by the 3.0
Windows Server R2 SP1
Windows Vista SP2
Windows Server SP2
Windows 7 SP1

2.0 Supported Operating systems
Windows Server 2003 Service Pack 1
Windows XP Service Pack 3
Windows Vista Service Pack 1 or later
Windows Server 2008
Windows Server R2
Windows 7

So this example uses 2.0 inside the php_sqlsrv_53_ts_vc9.dll extension;

2. Copy the Php_sqlsrv_53_ts_vc9.dll file to the PHP extension folder (typically

Php/ext folder below);
3. Copy this Php_sqlsrv_53_ts_vc9.dll file to the system32 of the disk on which the system resides;
4. Open the php.ini file and add the following line to the Extension=php_mysql.dll

Extension=php_sqlsrv_53_ts_vc9.dll

5. Installing the Driver X86 package (Sqlncli.msi)

If the connection is sql2005, install the sqlncli2005

If the connection is sql2008, install the sqlncli2008

If the connection sql2015 is installed sqlncli2015

6. Restart Apache

The above describes the PHP connection to SQL Server methods, including SQL Server content, I hope that the PHP tutorial interested in a friend to help.

  • Contact Us

    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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.