Home
%3CLINGO-SUB%20id%3D%22lingo-sub-385964%22%20slang%3D%22en-US%22%3EMicrosoft%20Drivers%205.3.0%20for%20PHP%20for%20SQL%20Server%20Released!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-385964%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3EFirst%20published%20on%20MSDN%20on%20Jul%2020%2C%202018%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%20Hi%20all%2C%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20We%20are%20excited%20to%20announce%20the%20production%20ready%20release%20for%20the%20%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fdownload%2Fdetails.aspx%3Fid%3D57163%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Microsoft%20Drivers%205.3.0%20for%20PHP%20for%20SQL%20Server%20%3C%2FA%3E%20.%20The%26nbsp%3Bdriver%20enables%20access%20to%20SQL%20Server%2C%20Azure%20SQL%20Database%2C%20Azure%20SQL%20Managed%20Instance%2C%20and%20Azure%20SQL%20DW%20from%20PHP%207.0-7.2%20applications%20on%20Linux%2C%20Windows%20and%20macOS.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Notable%20items%20about%20the%205.3.0%20release%20since%205.2.0%3A%20%3CBR%20%2F%3E%3CH3%20id%3D%22toc-hId-1511084482%22%20id%3D%22toc-hId-1535898497%22%3EAdded%3C%2FH3%3E%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3EAdded%20support%20for%20Azure%20Key%20Vault%20for%20Always%20Encrypted%20functionality.%20Always%20Encrypted%20functionality%20is%20supported%20on%20Linux%20and%20macOS%20through%20Azure%20Key%20Vault%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EAdded%20support%20for%20connection%20resiliency%20on%20Linux%20and%20macOS%20(requires%20version%2017.2%20or%20higher%20of%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Fconnect%2Fodbc%2Flinux-mac%2Finstalling-the-microsoft-odbc-driver-for-sql-server%3Fview%3Dsql-server-2017%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20ODBC%20driver%20%3C%2FA%3E%20)%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EAdded%20support%20for%20macOS%20High%20Sierra%20(requires%20version%2017%20or%20higher%20of%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Fconnect%2Fodbc%2Flinux-mac%2Finstalling-the-microsoft-odbc-driver-for-sql-server%3Fview%3Dsql-server-2017%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20ODBC%20driver%20%3C%2FA%3E%20)%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EAdded%20support%20for%20Ubuntu%2018.04%20(requires%20version%2017.2%20or%20higher%20of%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Fconnect%2Fodbc%2Flinux-mac%2Finstalling-the-microsoft-odbc-driver-for-sql-server%3Fview%3Dsql-server-2017%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20ODBC%20driver%20%3C%2FA%3E%20)%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%3CH3%20id%3D%22toc-hId--1041072479%22%20id%3D%22toc-hId--1016258464%22%3EFixed%3C%2FH3%3E%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3EIssue%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Fissues%2F577%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%23577%20%3C%2FA%3E%20-%20Idle%20Connection%20Resiliency%20doesn't%20work%20with%20Column%20Encryption%20enabled%20connections%20(fixed%20in%20MS%20ODBC%20Driver%2017.1)%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EIssue%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Fissues%2F678%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%23678%20%3C%2FA%3E%20-%20Idle%20Connection%20Resiliency%20doesn't%20work%20with%20Connection%20Pooling%20(fixed%20in%20MS%20ODBC%20Driver%2017.1)%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EIssue%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Fissues%2F699%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%23699%20%3C%2FA%3E%20-%20Binding%20output%20parameters%20fails%20when%20the%20query%20in%20the%20stored%20procedure%20returns%20no%20data.%20The%20test%20case%20has%20been%20added%20to%20the%20test%20lab.%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EIssue%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Fissues%2F705%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%23705%20%3C%2FA%3E%20-%20Always%20Encrypted%20-%20Retrieving%20a%20negative%20decimal%20value%20(edge%20case)%20as%20output%20parameter%20causes%20truncation%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EIssue%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Fissues%2F706%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%23706%20%3C%2FA%3E%20-%20Always%20Encrypted%20-%20Cannot%20insert%20double%20with%20precision%20and%20scale%20(38%2C%2038)%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EIssue%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Fissues%2F707%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%23707%20%3C%2FA%3E%20-%20Always%20Encrypted%20-%20Fetching%20decimals%20%2F%20numerics%20as%20output%20parameters%20bound%20to%20PDO%3A%3APARAM_BOOL%20or%20PDO%3A%3APARAM_INT%20returns%20floats%2C%20not%20integers%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EIssue%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Fissues%2F735%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%23735%20%3C%2FA%3E%20-%20Extended%20the%20buffer%20size%20for%20PDO%3A%3AlastInsertId%20so%20that%20data%20types%20other%20than%20integers%20can%20be%20supported%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EPull%20Request%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Fpull%2F759%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%23759%20%3C%2FA%3E%20-%20Removed%20the%20limitation%20of%20binding%20a%20binary%20as%20inout%20param%20as%20PDO%3A%3APARAM_STR%20with%20SQLSRV_ENCODING_BINARY%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EPull%20Request%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Fpull%2F775%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%23775%20%3C%2FA%3E%20-%20Fixed%20the%20truncation%20problem%20for%20output%20params%20with%20SQL%20types%20specified%20as%20SQLSRV_SQLTYPE_DECIMAL%20or%20SQLSRV_SQLTYPE_NUMERIC%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%3CH3%20id%3D%22toc-hId-701737856%22%20id%3D%22toc-hId-726551871%22%3ELimitations%3C%2FH3%3E%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3ENo%20support%20for%20inout%20%2F%20output%20params%20when%20using%20sql_variant%20type%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EIn%20Linux%20and%20macOS%2C%20setlocale()%20only%20takes%20effect%20if%20it%20is%20invoked%20before%20the%20first%20connection.%20Attempting%20to%20set%20the%20locale%20after%20connecting%20will%20not%20work%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EAlways%20Encrypted%20requires%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Fconnect%2Fodbc%2Flinux-mac%2Finstalling-the-microsoft-odbc-driver-for-sql-server%3Fview%3Dsql-server-2017%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20MS%20ODBC%20Driver%2017%2B%3C%2FA%3E%20%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3EOnly%20Windows%20Certificate%20Store%20and%20Azure%20Key%20Vault%20are%20supported.%20Custom%20Keystores%20are%20not%20supported%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EIssue%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Fissues%2F716%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%23716%20%3C%2FA%3E%20-%20With%20Always%20Encrypted%20enabled%2C%20named%20parameters%20in%20subqueries%20are%20not%20supported%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsql%2Fconnect%2Fphp%2Fusing-always-encrypted-php-drivers%3Fview%3Dsql-server-2017%23limitations-of-the-php-drivers-when-using-always-encrypted%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Always%20Encrypted%20limitations%20%3C%2FA%3E%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%3CH3%20id%3D%22toc-hId--1850419105%22%20id%3D%22toc-hId--1825605090%22%3EKnown%20Issues%3C%2FH3%3E%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3EConnection%20pooling%20on%20Linux%20or%20macOS%20is%20not%20recommended%20with%20%3CA%20href%3D%22http%3A%2F%2Fwww.unixodbc.org%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20unixODBC%20%3C%2FA%3E%20%26lt%3B%202.3.6%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EWhen%20pooling%20is%20enabled%20in%20Linux%20or%20macOS%20%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3EunixODBC%20%26lt%3B%3D%202.3.4%20(Linux%20and%20macOS)%20might%20not%20return%20proper%20diagnostic%20information%2C%20such%20as%20error%20messages%2C%20warnings%20and%20informative%20messages%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3Edue%20to%20this%20unixODBC%20bug%2C%20fetch%20large%20data%20(such%20as%20xml%2C%20binary)%20as%20streams%20as%20a%20workaround.%20See%20the%20examples%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Fwiki%2FFeatures%23pooling%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20here%3C%2FA%3E%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EWith%20ColumnEncryption%20enabled%2C%20calling%20stored%20procedures%20with%20XML%20parameters%20does%20not%20work%20(Issue%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Fissues%2F674%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%23674%20%3C%2FA%3E%20)%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%3CH3%20id%3D%22toc-hId--107608770%22%20id%3D%22toc-hId--82794755%22%3ESurvey%3C%2FH3%3E%3CBR%20%2F%3E%20Let%20us%20know%20how%20we%20are%20doing%20and%20how%20you%20use%20our%20driver%20by%20taking%20our%20pulse%20survey%3A%20%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fmssqlphpsurvey%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20https%3A%2F%2Faka.ms%2Fmssqlphpsurvey%3C%2FA%3E%20%3CBR%20%2F%3E%3CH2%20id%3D%22toc-hId-1831715070%22%20id%3D%22toc-hId-1856529085%22%3EGet%20Started%3C%2FH2%3E%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fsql-server%2Fdeveloper-get-started%2Fphp%2Fubuntu%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%3CSTRONG%3E%20Ubuntu%20%2B%20SQL%20Server%20%2B%20PHP%207%20%3C%2FSTRONG%3E%20%3C%2FA%3E%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fsql-server%2Fdeveloper-get-started%2Fphp%2Frhel%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%3CSTRONG%3E%20RedHat%20%2B%20SQL%20Server%20%2B%20PHP%207%20%3C%2FSTRONG%3E%20%3C%2FA%3E%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fsql-server%2Fdeveloper-get-started%2Fphp%2Fwindows%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%3CSTRONG%3E%20Windows%20%2B%20SQL%20Server%20%2B%20PHP%207%20%3C%2FSTRONG%3E%20%3C%2FA%3E%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fhub.docker.com%2Fr%2Flbosqmsft%2Fmssql-php-msphpsql%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%3CSTRONG%3E%20Docker%20%3C%2FSTRONG%3E%20%3C%2FA%3E%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%20Direct%20downloads%20can%20be%20found%20on%20the%20%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fdownload%2Fdetails.aspx%3Fid%3D57163%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Microsoft%20website%20%3C%2FA%3E%20or%20the%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Freleases%2Ftag%2Fv5.3.0%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Github%20release%20tag%20%3C%2FA%3E%20.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20David%20Engel%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-385964%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20MSDN%20on%20Jul%2020%2C%202018%20Hi%20all%2CWe%20are%20excited%20to%20announce%20the%20production%20ready%20release%20for%20the%20Microsoft%20Drivers%205.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-385964%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESQLServerDrivers%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft
First published on MSDN on Jul 20, 2018
Hi all,

We are excited to announce the production ready release for the Microsoft Drivers 5.3.0 for PHP for SQL Server . The driver enables access to SQL Server, Azure SQL Database, Azure SQL Managed Instance, and Azure SQL DW from PHP 7.0-7.2 applications on Linux, Windows and macOS.

Notable items about the 5.3.0 release since 5.2.0:

Added



  • Added support for Azure Key Vault for Always Encrypted functionality. Always Encrypted functionality is supported on Linux and macOS through Azure Key Vault

  • Added support for connection resiliency on Linux and macOS (requires version 17.2 or higher of the ODBC driver )

  • Added support for macOS High Sierra (requires version 17 or higher of the ODBC driver )

  • Added support for Ubuntu 18.04 (requires version 17.2 or higher of the ODBC driver )


Fixed



  • Issue #577 - Idle Connection Resiliency doesn't work with Column Encryption enabled connections (fixed in MS ODBC Driver 17.1)

  • Issue #678 - Idle Connection Resiliency doesn't work with Connection Pooling (fixed in MS ODBC Driver 17.1)

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

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

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

  • Issue #707 - Always Encrypted - 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 so 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 truncation 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 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 - With 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 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 Microsoft website or the Github release tag .

David Engel