System Requirements
Collapse the table of content
Expand the table of content

System Requirements for the PHP SQL Driver

 

DownloadDownload PHP Driver

To access data in a SQL Server or Azure SQL Database using the Microsoft Drivers for PHP for SQL Server, you must have the following components installed on your computer:

  • PHP is required. For information about how to download and install the latest stable binaries, see http://php.net. The Microsoft Drivers for PHP for SQL Server require the following versions:
Microsoft Drivers for PHP for SQL Server VersionSupported PHP Versions
4.0PHP 7.0
3.2PHP 5.6.4+ or

PHP 5.5.16+ or

PHP 5.4.32
3.1PHP 5.5.16+ or

PHP 5.4.32
3.0PHP 5.4.32 or

PHP 5.3.0
2.0PHP 5.3.0 or

PHP 5.2.4 or

PHP 5.2.13
  • 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 PHP SQL Driver for information on configuring the driver for the PHP runtime. To download the drivers, see Microsoft Drivers for PHP for SQL Server.

  • A Web server is required. 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.

    System_CAPS_ICON_note.jpg Note


    Microsoft provides support only for IIS.

  • The correct version of the Microsoft ODBC Driver for SQL Server or SQL Server Native Client is required on the computer where PHP is running. Note that if you are using a 64-bit operating system, the x86 version will be installed with the x64 installer (do not use the x86 version of the installer unless you are using a 32-bit operating system).

Microsoft Drivers for PHP for SQL Server VersionVersion of Microsoft ODBC Driver for SQL Server or SQL Server Native Client
4.0Microsoft ODBC Driver 11 for SQL Server or Microsoft ODBC Driver 13 for SQL Server. To download the x64 package for 64-bit operating systems, or x86 package for 32-bit operating systems, see the Microsoft ODBC Driver 11 for SQL Server page or Microsoft ODBC Driver 13 for SQL Server page
3.2 or

3.1
Microsoft ODBC Driver 11 for SQL Server. To download the x64 package for 64-bit operating systems, or x86 package for 32-bit operating systems, see the Microsoft ODBC Driver 11 for SQL Server page
3.0Microsoft SQL Server 2012 Native Client. You can download Microsoft SQL Server 2012 Native Client from the SQL Server 2012 feature pack page
2.0Microsoft SQL Server 2008 R2 Native Client:

Download the X86 package for 32-bit operating systems

Download the X64 package for 64-bit operating systems

If you are using the SQLSRV driver, sqlsrv_client_info will return information about which version of SQL Server Native Client or Microsoft ODBC Driver for SQL Server 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.

  • Azure SQL Databases are supported. For information see Connecting to Microsoft Azure SQL Database.

  • Microsoft Drivers for PHP for SQL Server version 3.1 and later support SQL Server 2008 and later

  • Microsoft Drivers for PHP for SQL Server version 2.0 and 3.0 support SQL Server 2005 and later

This section lists the drivers that are included with each version of the Microsoft Drivers for PHP for SQL Server.

Follow the installation instructions in Loading the PHP SQL Driver to configure the driver for use with the PHP runtime.

Microsoft Drivers 4.0 for PHP for SQL Server installs the following versions of the driver:

Driver filePHP versionThread safe?Use with PHP .dll
php_sqlsrv_7_nts_x86.dll

php_pdo_sqlsrv_7_nts_x86.dll
7.0no32-bit php7.dll
php_sqlsrv_7_ts_x86.dll

php_pdo_sqlsrv_7_ts_x86.dll
7.0yes32-bit php7ts.dll
php_sqlsrv_7_nts_x64.dll

php_pdo_sqlsrv_7_nts_x64.dll
7.0no64-bit php7.dll
php_sqlsrv_7_ts_x64.dll

php_pdo_sqlsrv_7_ts_x64.dll
7.0yes64-bit php7ts.dll

Microsoft Drivers 3.2 for PHP for SQL Server installs the following versions of the driver:

Driver filePHP versionThread safe?Use with PHP .dll
php_sqlsrv_54_nts.dll

php_pdo_sqlsrv_54_nts.dll
5.4nophp5.dll
php_sqlsrv_54_ts.dll

php_pdo_sqlsrv_54_ts.dll
5.4yesphp5ts.dll
php_sqlsrv_55_nts.dll

php_pdo_sqlsrv_55_nts.dll
5.5nophp5.dll
php_sqlsrv_55_ts.dll

php_pdo_sqlsrv_55_ts.dll
5.5yesphp5ts.dll
php_sqlsrv_56_nts.dll

php_pdo_sqlsrv_56_nts.dll
5.6nophp5.dll
php_sqlsrv_56_ts.dll

php_pdo_sqlsrv_56_ts.dll
5.6yesphp5ts.dll

Microsoft Drivers 3.1 for PHP for SQL Server installs the following versions of the driver:

Driver filePHP versionThread safe?Use with PHP .dll
php_sqlsrv_54_nts.dll

php_pdo_sqlsrv_54_nts.dll
5.4nophp5.dll
php_sqlsrv_54_ts.dll

php_pdo_sqlsrv_54_ts.dll
5.4yesphp5ts.dll
php_sqlsrv_55_nts.dll

php_pdo_sqlsrv_55_nts.dll
5.5nophp5.dll
php_sqlsrv_55_ts.dll

php_pdo_sqlsrv_55_ts.dll
5.5yesphp5ts.dll

Microsoft Drivers 3.0 for PHP for SQL Server installs the following versions of the driver:

Driver filePHP versionThread safe?Use with PHP .dll
php_sqlsrv_53_nts.dll

php_pdo_sqlsrv_53_nts.dll
5.3nophp5.dll
php_sqlsrv_53_ts.dll

php_pdo_sqlsrv_53_ts.dll
5.3yesphp5ts.dll
php_sqlsrv_54_nts.dll

php_pdo_sqlsrv_54_nts.dll
5.4nophp5.dll
php_sqlsrv_54_ts.dll

php_pdo_sqlsrv_54_ts.dll
5.4yesphp5ts.dll

Microsoft Drivers 2.0 for PHP for SQL Server installs the following versions of the driver:

Driver filePHP versionThread safe?Use with PHP .dll
php_sqlsrv_53_nts_vc6.dll

php_pdo_sqlsrv_53_nts_vc6.dll
5.3nophp5.dll
php_sqlsrv_53_nts_vc9.dll

php_pdo_sqlsrv_53_nts_vc9.dll
5.3nophp5.dll
php_sqlsrv_53_ts_vc6.dll

php_pdo_sqlsrv_53_ts_vc6.dll
5.3yesphp5ts.dll
php_sqlsrv_53_ts_vc9.dll

php_pdo_sqlsrv_53_ts_vc9.dll
5.3yesphp5ts.dll
php_sqlsrv_52_nts_vc6.dll

php_pdo_sqlsrv_52_nts_vc6.dll
5.2nophp5.dll
php_sqlsrv_52_ts_vc6.dll

php_pdo_sqlsrv_52_ts_vc6.dll
5.2yesphp5ts.dll

If the name of the driver file contains "vc9", it should be used with a PHP version compiled with Visual C++ 9.0.

  • Supported operating systems for version 3.2 and 3.1 of the driver include:

    • Windows Server 2008 SP2
    • Windows Server 2008 R2 SP1
    • Windows Server 2012
    • Windows Server 2012 R2
    • Windows Vista SP2
    • Windows 7 SP1
    • Windows 8
    • Windows 8.1
    • Windows 10
  • Supported operating systems for version 3.2 and 3.1 of the driver include:

    • Windows Server 2008 R2 SP1
    • Windows Vista SP2
    • Windows Server 2008 SP2
    • Windows 7 SP1
    • Windows Server 2012
    • Windows Server 2012 R2
    • Windows 8
    • Windows 8.1
  • Supported operating systems for version 3.0 of the driver include:

    • Windows Server 2008 R2 SP1
    • Windows Vista SP2
    • Windows Server 2008 SP2
    • Windows 7 SP1
  • Supported operating systems for version 2.0 of the driver include:

    • Supported operating systems for version 2.0 of the driver include:
    • Windows Server 2003 Service Pack 1
    • Windows XP Service Pack 3
    • Windows Vista Service Pack 1 or later
    • Windows Server 2008
    • Windows Server 2008 R2
    • Windows 7

Getting Started with the PHP SQL DriverProgramming Guide for PHP SQL DriverSQLSRV Driver API Reference

Community Additions

ADD
Show:
© 2016 Microsoft