Microsoft Drivers 4.0 for PHP Linux for SQL Server Released!

Dear PHP Community,

We are pleased to announce the release of the Microsoft PHP Linux Driver 4.0 for SQL Server! The new driver enables access to SQL Server 2008+, Azure SQL Database and Azure SQL DW from any PHP 7 application on Linux. Going forward, we will continue to fix bugs and ship regular updates to the GitHub repository and PECL.

The major highlights of this release include: support for SQL Server 2016, PHP7 and PHP7.1, Linux (Ubuntu 15.04, Ubuntu 16.04, and RedHat 7.2), PECL packages, bug fixes, and better test coverage.

Here is a summary of the improvements since our previous release

Added

  • Added SQLSRV_ATTR_FETCHES_NUMERIC_TYPE attribute support in PDO_SQLSRV driver.SQLSRV_ATTR_FETCHES_NUMERIC_TYPE connection attribute flag handles numeric fetches from columns with numeric Sql types (only bit, integer, smallint, tinyint, float and real). Note for exceptions:
    • When connection option flag ATTR_STRINGIFY_FETCHES is on, even when SQLSRV_ATTR_FETCHES_NUMERIC_TYPE is on, the return value will still be string.
    • When the returned PDO type in bind column is PDO_PARAM_INT, the return value from a integer column will be int even if SQLSRV_ATTR_FETCHES_NUMERIC_TYPE is off.
  • Added Unicode column name support (issue #138).

Fixed

  • Fixed issue with SQLSRV_ATTR_FETCHES_NUMERIC_TYPE when column return type is set on statement (issue #173).
  • Fixed precision issues with double data types when using buffered queries with the PDO_SQLSRV driver.
  • Fixed issue with buffered cursor in PDO_SQLSRV driver when CharacterSet is UTF-8 (issue #192).
  • Fixed segmentation fault in error cases when error message is returned with emulate prepare attribute is set to true in PDO_SQLSRV driver.
  • Fixed issue with empty output parameters on stored procedure (issue #182).
  • Fixed memory leaks in buffered queries.

Limitations & Known issues

  • This release contains the PHP 7 port of the SQLSRV and PDO_SQLSRV drivers on Linux, and does not provide backwards compatibility with PHP 5.
  • Connection using named instances using '\' is not supported.
  • Local encodings other than UTF-8 are not supported, and SQLSRV_ENC_CHAR only supports ASCII characters with ASCII code of 0 to 127.
  • Connection pooling in PDO_SQLSRV is not supported.
  • Binary column binding with emulate prepare (issue#140)

Future Plans

Going forward we plan on improving the current Linux port, expand SQL 16 Feature Support (example: Always Encrypted), build verification/fundamental tests, and fix bug fixes reported on GitHub

Getting the Production Ready Release

Check out our getting started guide to install the PHP Driver and its pre-requisites. We provide support for any bugs reported on our GitHub Issues page. As always, we welcome contributions of any kind, be they Pull Requests, or Feature Enhancements.

I’d like to thank everyone on behalf of the team for supporting us in our endeavors to provide you with a high-quality driver. Happy downloading!

Meet Bhagdev (meetb@microsoft.com)

 

MSFTlovesPHP