Servers

    Microsoft Drivers for PHP for SQL Server

    Language:
    English
    The Microsoft Drivers 3.1 CTP, 3.0, and 2.0 for PHP for SQL Server provide connectivity to Microsoft SQL Server from PHP applications.
    • Note:There are multiple files available for this download.Once you click on the "Download" button, you will be prompted to select the files you need.
      Version:

      3.1

      File Name:

      SQLSRV30.EXE

      SQLSRV20.EXE

      SQLSRV31.EXE

      Date Published:

      11/5/2014

      File Size:

      833 KB

      790 KB

      499 KB

        The Microsoft Drivers 3.1 CTP, 3.0 and 2.0 for PHP for SQL Server are PHP 5 extensions that allows for the reading and writing of SQL Server data from within PHP scripts. The SQLSRV extension provides a procedural interface while the PDO_SQLSRV extension implements PDO for accessing data in all editions of SQL Server 2005 and later (version 3.1 requires SQL Server 2008 and later).

        Version 3.1 is currently a Community Tech Preview (CTP).
        Version 3.1 CTP now supports PHP 5.5 and requires Microsoft ODBC Driver 11 (or higher) for SQL Server. Previous versions required SQL Native Client. Major improvement in the version 3.0 elease is support for SQL Server 2012; features including: LocalDB and AlwaysOn. Additionally, support for Buffered Queries was added. This release is available to all SQL Server users at no additional charge.
    • Supported Operating System

      Windows 7, Windows Server 2008 R2, Windows Server 2008 Service Pack 2, Windows Vista Service Pack 2

        • PHP 5. For information about how to download and install the latest stable binaries, visit http://php.net.
        • Microsoft Drivers for PHP for SQL Server, version 3.1 requires PHP 5.4.32, or PHP 5.5.16, or later.
        • Microsoft Drivers for PHP for SQL Server, version 3.0 requires PHP 5.3.0 or later. If possible, use PHP 5.3.6, or later.
        • The version 2.0 driver works with PHP 5.2.4 or later, but not with PHP 5.4. If possible, use PHP 5.2.13, or later.
        • A version of the driver file must be in your PHP extension directory. See Driver Versions later in this topic for information about the different driver files. See Loading the Microsoft Drivers for PHP for SQL Server for information on configuring the driver for the PHP runtime.
        • (See The Data Center for the Microsoft Drivers for PHP for SQL Server for information on where to download the Microsoft Drivers for PHP for SQL Server.)
        • A Web server. Your Web server must be configured to run PHP. For information about hosting PHP applications with Internet Information Services (IIS) 6.0, see Using FastCGI to Host PHP Applications on IIS 6.0. For information about hosting PHP applications with IIS 7.0, see Using FastCGI to Host PHP Applications on IIS 7.0.
        • The Microsoft Drivers for PHP for SQL Server has been tested using IIS 6 and IIS 7 with FastCGI.
        • For version Version 3.1 of the driver requires Microsoft ODBC Driver 11 (or higher) for SQL Server version 11 or greater. You can download the Microsoft ODBC Driver 11 for SQL Server from the Microsoft® ODBC Driver 11 for SQL Server® - Windows page.
        • If you are using the SQLSRV driver, sqlsrv_client_info will return information about which version of SQL Server Native Client is being used by the Microsoft Drivers for PHP for SQL Server. If you are using the PDO_SQLSRV driver, you can use PDO::getAttribute to discover the version.
        • For versions 3.0 and 2.0, the x86 version of SQL Server Native Client is required on the computer where PHP is running. If you are using a 64-bit operating system, the x86 version of SQL Server Native Client will be installed with the x64 version of SQL Server Native Client (do not install the x86 version of SQL Server Native Client on an x64 operating system).
        • If you are using the SQLSRV driver, sqlsrv_client_info will return information about which version of SQL Server Native Client is being used by the Microsoft Drivers for PHP for SQL Server. If you are using the PDO_SQLSRV driver, you can use PDO::getAttribute to discover the version.
        • Version 3.0 of the driver requires Microsoft SQL Server 2012 Native Client. You can download Microsoft SQL Server 2012 Native Client from the SQL Server 2012 feature pack page.
        • Version 2.0 of the driver requires Microsoft SQL Server 2008 R2 Native Client. Click on the appropriate link below: Download the X86 package Download the X64 package.
      • Perform the following steps to download and install the Microsoft Drivers for PHP for SQL Server (example below for 3.1 version):
        1. Download SQLSRV31.EXE to a temporary directory
        2. Run SQLSRV31.EXE
        3. When prompted, enter the path to the PHP extensions directory
        4. After extracting the files, read the Installation section of the SQLSRV31_Readme.htm file for next steps


        Additional information

        Community Support: SQL Server PHP Driver forum
        Submit Feedback: SQL Server Feedback Center
        Documentation: Refer included SQLSRV30_Help.chm, or MSDN Online Documentation.
        Team Blog: Browse our blog for comments from the team in the team blog.
      • Please note that the download link for the 2.0 Driver will be deprecated in the near future.

    Popular downloads

    Loading your results, please wait...

    Free PC updates

    • Security patches
    • Software updates
    • Service packs
    • Hardware drivers

    Microsoft suggests

    Download a free trial of Windows Server 2012 R2.
    Windows Server 2012 R2 free trial
    Experience the new and enhanced capabilities.
    Free trial