Home
%3CLINGO-SUB%20id%3D%22lingo-sub-386000%22%20slang%3D%22en-US%22%3EMicrosoft%20Drivers%205.4.0%20Preview%20for%20PHP%20for%20SQL%20Server%20Released!%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-386000%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%20Sep%2024%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%20a%20new%20technical%20preview%20for%20SQLSRV%20and%20PDO_SQLSRV%20drivers%20for%20PHP.%20The%20driver%20supports%20the%20Microsoft%20ODBC%20Driver%2017.3%20(Preview)%20for%20SQL%20Server%20driver%20and%20includes%20some%20fixes%20and%20new%20features.%20%3CBR%20%2F%3E%20%3CBR%20%2F%3E%20Notable%20items%20about%20the%205.4.0-preview%20release%3A%20%3CBR%20%2F%3E%3CH3%20id%3D%22toc-hId-1511084482%22%20id%3D%22toc-hId-1535899205%22%3EAdded%3C%2FH3%3E%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3EAdded%20support%20for%20%3CA%20href%3D%22http%3A%2F%2Fphp.net%2Farchive%2F2018.php%23id2018-09-13-2%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20PHP%207.3.0%20RC1%3C%2FA%3E%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EAdded%20support%20for%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Fwiki%2FFeatures%23AzureAD%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Azure%20AD%20Access%20Token%20%3C%2FA%3E%20(in%20Linux%20%2F%20macOS%20this%20requires%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fsql%2Fconnect%2Fodbc%2Flinux-mac%2Finstalling-the-microsoft-odbc-driver-for-sql-server%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20MS%20ODBC%20Driver%2017%2B%20%3C%2FA%3E%20and%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%202.3.6%2B)%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EFeature%20Request%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Fpull%2F842%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%23842%20%3C%2FA%3E%20-%20new%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Fwiki%2FFeatures%23datetime%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20PDO_STMT_OPTION_FETCHES_DATETIME_TYPE%20flag%20%3C%2FA%3E%20for%20pdo_sqlsrv%20to%20return%20datetime%20as%20objects%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EFeature%20Request%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Fpull%2F844%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%23844%20%3C%2FA%3E%20-%20add%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Fwiki%2FFeatures%23datetime%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20ReturnDatesAsStrings%20option%20to%20statement%20level%20for%20sqlsrv%3C%2FA%3E%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3ECompatible%20with%20%3CA%20href%3D%22https%3A%2F%2Fblogs.msdn.microsoft.com%2Fsqlnativeclient%2F2018%2F09%2F24%2Fodbc-driver-17-3-preview-for-sql-server-released%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20ODBC%20Driver%2017.3%20CTP%3C%2FA%3E%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--1016257756%22%3ERemoved%3C%2FH3%3E%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3EDropped%20support%20for%20Ubuntu%2017.10%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EDropped%20support%20for%20PHP%207.0%20-%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fsql%2Fconnect%2Fphp%2Fsystem-requirements-for-the-php-sql-driver%3Fview%3Dsql-server-2017%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20Version%205.3%20%3C%2FA%3E%20is%20the%20last%20to%20support%20PHP%207.0.%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-726552579%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%2F434%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%23434%20%3C%2FA%3E%20-%20To%20avoid%20the%20pitfall%20that%20could%20result%20in%20a%20crash%2C%20before%20freeing%20stmt%20in%20the%20destructor%20check%20if%20its%20dbh%20driver%20data%20is%20NULL%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EPull%20Request%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Fpull%2F836%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%23836%20%3C%2FA%3E%20-%20Modified%20the%20config%20files%20to%20enable%20Spectre%20Mitigations%20(use%20%2FQspectre%20switch)%20for%20PHP%207.2%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EPull%20Request%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Fpull%2F833%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%23833%20%3C%2FA%3E%20-%20Streamlined%20the%20error%20handling%20to%20remove%20a%20potential%20cause%20of%20crash%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--1825604382%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%2Fsql%2Fconnect%2Fodbc%2Flinux-mac%2Finstalling-the-microsoft-odbc-driver-for-sql-server%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%20yet%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%2Fsql%2Fconnect%2Fphp%2Fusing-always-encrypted-php-drivers%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--107608770%22%20id%3D%22toc-hId--82794047%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.7%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%3CLI%3EWith%20ColumnEncryption%20enabled%2C%20fetching%20varbinary(max)%2C%20varchar(max)%20or%20nvarchar(max)%20may%20fail%20with%20ODBC%20Driver%2017.3%20CTP%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%3CH3%20id%3D%22toc-hId-1635201565%22%20id%3D%22toc-hId-1660016288%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--720441891%22%20id%3D%22toc-hId--695627168%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%2Fgithub.com%2FMicrosoft%2Fmsphpsql%2Freleases%2Ftag%2Fv5.4.0-preview%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-386000%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20MSDN%20on%20Sep%2024%2C%202018%20Hi%20all%2CWe%20are%20excited%20to%20announce%20a%20new%20technical%20preview%20for%20SQLSRV%20and%20PDO_SQLSRV%20drivers%20for%20PHP.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-386000%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESQLServerDrivers%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft
First published on MSDN on Sep 24, 2018
Hi all,

We are excited to announce a new technical preview for SQLSRV and PDO_SQLSRV drivers for PHP. The driver supports the Microsoft ODBC Driver 17.3 (Preview) for SQL Server driver and includes some fixes and new features.

Notable items about the 5.4.0-preview release:

Added



Removed



  • Dropped support for Ubuntu 17.10

  • Dropped support for PHP 7.0 - Version 5.3 is the last to support PHP 7.0.


Fixed



  • Issue #434 - To avoid the pitfall that could result in a crash, before freeing stmt in the destructor check if its dbh driver data is NULL

  • Pull Request #836 - Modified the config files to enable Spectre Mitigations (use /Qspectre switch) for PHP 7.2

  • Pull Request #833 - Streamlined the error handling to remove a potential cause of crash


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 yet 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.7

  • 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 )

  • With ColumnEncryption enabled, fetching varbinary(max), varchar(max) or nvarchar(max) may fail with ODBC Driver 17.3 CTP


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 .

David Engel