Microsoft Drivers 5.2.1 Preview for PHP for SQL Server Released!
Published Mar 23 2019 05:40 PM 628 Views
Microsoft
First published on MSDN on May 31, 2018
Hi all,

We are excited to announce a new technical preview for SQLSRV and PDO_SQLSRV drivers. The driver now supports basic CRUD functionalities with the Always Encrypted feature for Windows, Linux and macOS. Both drivers have been built with PHP 7.0+ and tested on all supported platforms (Windows, Ubuntu 16.04 and 17.10, RedHat 7, Debian 8 and 9, Suse 12, and macOS 10.11, 10.12, and 10.13).

Notable items about 5.2.1-preview release:

Added



  • Added support for Azure Key Vault for Always Encrypted for basic CRUD functionalities such that Always Encrypted feature is also available to Linux or macOS users

  • Added support for macOS High Sierra (requires MS ODBC Driver 17+ )


Fixed



  • Issue #577 - Idle Connection Resiliency doesn't work with Column Encryption enabled connection

  • Issue #678 - Idle Connection Resiliency doesn't work with Connection Pooling bug

  • Issue #699 - Binding output parameter failed when the query in the stored procedure returned no data. The test case has been added to the test lab.

  • Issue #705 - AE - Retrieving a negative decimal value (edge case) as output parameter causes truncation

  • Issue #706 - AE - Cannot insert double with precision and scale (38, 38)

  • Issue #707 - AE - Fetching decimals / numerics as output parameters bound to PDO::PARAM_BOOL or PDO::PARAM_INT returns floats, not integers

  • Issue #735 - Extended the buffer size for PDO lastInsertId such that data types other than integers can be supported

  • Pull Request #759 - Removed the limitation of binding a binary as inout param as PDO::PARAM_STR with SQLSRV_ENCODING_BINARY

  • Pull Request #775 - Fixed the problem for output params with SQL types specified as SQLSRV_SQLTYPE_DECIMAL or SQLSRV_SQLTYPE_NUMERIC


Limitations



  • No support for inout / output params when using sql_variant type

  • In Linux and macOS, setlocale() only takes effect if it is invoked before the first connection. Attempting to set the locale after connection will not work

  • Always Encrypted feature, which requires MS ODBC Driver 17+

    • only Windows Certificate Store and Azure Key Vault are supported

    • Issue #716 - With Always Encrypted feature enabled, Named Parameters in Sub Queries 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 on Linux or macOS

    • unixODBC <= 2.3.4 (Linux and macOS) might not return proper diagnostics 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 the examples here



  • With ColumnEncryption enabled, calling stored procedures with XML parameters does not work (Issue #674 )


Survey


Let us know how we are doing and how you use our driver by taking our pulse survey: https://aka.ms/mssqlphpsurvey

Get Started



Direct downloads can be found on the Github release tag .

Getting Drivers for PHP5 and older runtimes


You can download the Microsoft Drivers for PHP for SQL Server for old versions of  PHP (5.4, 5.5 and 5.6) from the download center: https://www.microsoft.com/en-us/download/details.aspx?id=20098 . Version 3.0 supports PHP 5.4, version 3.1 supports PHP 5.4 and PHP 5.5 and version 3.2 supports PHP 5.4, 5.5 and 5.6.
PHP DriverVersion Supported
v3.2 PHP 5.6, 5.5, 5.4
v3.1 PHP 5.5, 5.4
v3.1 PHP 5.4

David Engel
Version history
Last update:
‎Mar 23 2019 05:40 PM
Updated by: