Drivers 5.6 for PHP for SQL Server Released

This post has been republished via RSS; it originally appeared at: MSDN Blogs.

We are excited to announce the production ready release of the Microsoft Drivers 5.6 for PHP for SQL Server. The drivers enable access to SQL Server, Azure SQL Database, Azure SQL Managed Instance, and Azure SQL DW from PHP 7.1-7.3 applications on Linux, Windows and macOS.

Notable items about the 5.6 release since the previous 5.3 production release:

Added

  • Added support for PHP 7.3
  • Added support for Linux SUSE 15, Ubuntu 18.10 and macOS Mojave
  • Feature Request #415 - new options at connection and statement levels for both drivers for formatting decimal values in the fetched results
  • Added support for Azure AD Access Token (in Linux / macOS this requires MS ODBC Driver 17+ and unixODBC3.6+)
  • Added support for Authentication with Azure Active Directory using Managed Identity for Azure Resources (requires MS ODBC Driver 17.3+)
  • Feature Request #842 - new PDO_STMT_OPTION_FETCHES_DATETIME_TYPE flag for pdo_sqlsrv to return datetime as objects
  • Feature Request #844 - add ReturnDatesAsStrings option to statement level for sqlsrv

Fixed

  • Issue #434- To avoid possible crashes, before freeing stmt in the destructor check if its dbh driver data is NULL
  • Pull Request #833- Streamlined the error handling to remove a potential cause of crash
  • Pull Request #836- Modified the config files to enable Spectre Mitigations (use /Qspectre switch) for PHP 7.2 (see related Request #878)
  • Pull Request #854- Clear Azure Key Vault data after connection attributes are successfully set or when exception is thrown
  • Pull Request #855- Improved performance by saving meta data before fetching and skipping unnecessary conversions for numeric data
  • Pull Request #865- Corrected the way SQLPutData and SQLParamData are used when sending stream data to the server
  • Pull Request #878- Modified the config files to enable Spectre Mitigations for PHP 7.1 (see related Request #836)
  • Pull Request #891- Improved performance of Unicode conversions
  • Pull Request #892- Removed warning messages while compiling extensions
  • Pull Request #904- Enabled compiling extensions statically into PHP
  • Pull Request #907- Initialized output param buffer when allocating extra space
  • Pull Request #919- Initialized a boolean variable before passing it by reference into a function that will modify its value

Limitations

  • No support for inout / output params when using sql_variant type
  • No support for inout / output params when formatting decimal values
  • On Linux and macOS, setlocale() only takes effect if it is invoked before the first connection. Attempting to set the locale after connecting will not work
  • Always Encrypted requires MS ODBC Driver 17+
    • Only Windows Certificate Store and Azure Key Vault are supported. Custom Keystores are not supported
    • Issue #716 - Wit h Always Encrypted enabled, named parameters in subqueries are not supported
    • Always Encrypted limitations

Known Issues

  • Connection pooling on Linux or macOS is not recommended with unixODBC < 2.3.6
  • When pooling is enabled in Linux or macOS
    • unixODBC <= 2.3.4 (Linux and macOS) might not return proper diagnostic information, such as error messages, warnings and informative messages
    • due to this unixODBC bug, fetch large data (such as xml, binary) as streams as a workaround. See these connection pooling examples
  • With ColumnEncryption enabled, calling stored procedures with XML parameters does not work (Issue #674)

Get Started

Direct downloads can be found on the Microsoft Download Center or the Github release tag.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.