Home
%3CLINGO-SUB%20id%3D%22lingo-sub-849451%22%20slang%3D%22en-US%22%3EMicrosoft%20Drivers%205.7.0%20Preview%20for%20PHP%20for%20SQL%20Server%20Released%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-849451%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20recently%20released%20the%20next%20preview%20of%20the%20Microsoft%20Drivers%20for%20PHP%20for%20SQL%20Server%2C%20version%205.7.0-preview.%20This%20preview%20release%20has%20been%20built%20with%20PHP%207.1%2B%20and%20tested%20on%20all%20supported%20platforms.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENotable%20items%20about%20this%20release%20include%3A%3C%2FP%3E%3CH3%20id%3D%22toc-hId-1623808754%22%20id%3D%22toc-hId-1623808784%22%3EAdded%3C%2FH3%3E%3CUL%3E%3CLI%3ESupport%20for%20PHP%207.4%20RC%201%3C%2FLI%3E%3CLI%3ESupport%20for%20Linux%20Ubuntu%2019.04%20and%20Debian%2010%3C%2FLI%3E%3CLI%3EFeature%20Request%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fissues%2F929%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23929%3C%2FA%3E-%20new%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fwiki%2FFeatures%23language%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3ELanguage%20option%3C%2FA%3E-%20Pull%20Request%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F930%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23930%3C%2FA%3E%3C%2FLI%3E%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fwiki%2FFeatures%23data-classification-sensitivity-metadata%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EData%20Classification%20Sensitivity%20Metadata%20Retrieval%3C%2FA%3E%2C%20which%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%20noopener%20noreferrer%20noopener%20noreferrer%22%3EMS%20ODBC%20Driver%2017.2%2B%3C%2FA%3Eand%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fsql%2Fsql-server%2Fsql-server-ver15-release-notes%3Fview%3Dsqlallproducts-allversions%23-release-candidate-rc%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3ESQL%20Server%202019%20release%20candidate%3C%2FA%3E%3C%2FLI%3E%3C%2FUL%3E%3CH3%20id%3D%22toc-hId--928348207%22%20id%3D%22toc-hId--928348177%22%3ERemoved%3C%2FH3%3E%3CUL%3E%3CLI%3EDropped%20support%20for%20Ubuntu%2018.10%3C%2FLI%3E%3C%2FUL%3E%3CH3%20id%3D%22toc-hId-814462128%22%20id%3D%22toc-hId-814462158%22%3EFixed%3C%2FH3%3E%3CUL%3E%3CLI%3EIssue%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fissues%2F570%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23570%3C%2FA%3E-%20Fixed%20fetching%20varbinary%20data%20using%20client%20buffer%20with%20sqlsrv%3C%2FLI%3E%3CLI%3EPull%20Request%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F972%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23972%3C%2FA%3E-%20Removed%20redundant%20calls%20to%20retrieve%20the%20number%20of%20columns%20or%20rows%20in%20the%20current%20query%20result%20set%3C%2FLI%3E%3CLI%3EPull%20Request%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F978%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23978%3C%2FA%3E-%20PDO_SQLSRV%20implementation%20of%20PDO%3A%3AgetColumnMeta%20now%20references%20cached%20metadata%20rather%20than%20making%20an%20ODBC%20call%20every%20time%3C%2FLI%3E%3CLI%3EPull%20Request%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F979%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23979%3C%2FA%3E-%20Added%20support%20for%20data%20classification%20Sensitivity%20metadata%20retrieval%3C%2FLI%3E%3CLI%3EPull%20Request%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F985%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23985%3C%2FA%3E-%20Fixed%20memory%20issues%20with%20data%20classification%20data%20structures%3C%2FLI%3E%3CLI%3EIssue%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fissues%2F432%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23432%3C%2FA%3E-%20Having%20any%20invalid%20UTF-8%20name%20in%20the%20connection%20string%20will%20no%20longer%20invoke%20misleading%20error%20messages%3C%2FLI%3E%3CLI%3EIssue%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fissues%2F909%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23909%3C%2FA%3E-%20Fixed%20potential%20exception%20with%20locale%20issues%20in%20macOS%3C%2FLI%3E%3CLI%3EPull%20Request%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F992%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23992%3C%2FA%3E-%20Produced%20the%20correct%20error%20when%20requesting%20Data%20Classification%20metadata%20with%20ODBC%20drivers%20prior%20to%2017%3C%2FLI%3E%3CLI%3EPull%20Request%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F1001%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%231001%3C%2FA%3E-%20Fixed%20compilation%20issue%20with%20PHP%207.4%20alpha%3C%2FLI%3E%3CLI%3EPull%20Request%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F1004%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%231004%3C%2FA%3E-%20Fixed%20another%20compilation%20issue%20with%20PHP%207.4%20alpha%3C%2FLI%3E%3CLI%3EPull%20Request%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F1008%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%231008%3C%2FA%3E-%20Improved%20data%20caching%20when%20fetching%20datetime%20objects%3C%2FLI%3E%3CLI%3EPull%20Request%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F1011%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%231011%3C%2FA%3E-%20Fixed%20a%20potential%20buffer%20overflow%20when%20parsing%20for%20escaped%20braces%20in%20the%20connection%20string%3C%2FLI%3E%3CLI%3EPull%20Request%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F1015%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%231015%3C%2FA%3E-%20Fixed%20compilation%20issues%20and%20addressed%20various%20memory%20leaks%20detected%20by%20PHP%207.4%20beta%201%3C%2FLI%3E%3C%2FUL%3E%3CH3%20id%3D%22toc-hId--1737694833%22%20id%3D%22toc-hId--1737694803%22%3ELimitations%3C%2FH3%3E%3CUL%3E%3CLI%3ENo%20support%20for%20inout%20%2F%20output%20params%20when%20using%20sql_variant%20type%3C%2FLI%3E%3CLI%3ENo%20support%20for%20inout%20%2F%20output%20params%20when%20formatting%20decimal%20values%3C%2FLI%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%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%20noopener%20noreferrer%20noopener%20noreferrer%22%3EMS%20ODBC%20Driver%2017%2B%3C%2FA%3E%3CUL%3E%3CLI%3EOnly%20Windows%20Certificate%20Store%20and%20Azure%20Key%20Vault%20are%20supported.%20Custom%20Keystores%20are%20not%20yet%20supported%3C%2FLI%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%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23716%3C%2FA%3E-%20With%20Always%20Encrypted%20enabled%2C%20named%20parameters%20in%20subqueries%20are%20not%20supported%3C%2FLI%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%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAlways%20Encrypted%20limitations%3C%2FA%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3C%2FUL%3E%3CH3%20id%3D%22toc-hId-5115502%22%20id%3D%22toc-hId-5115532%22%3EKnown%20Issues%3C%2FH3%3E%3CUL%3E%3CLI%3EData%20Classification%20metadata%20retrieval%20is%20not%20compatible%20with%20ODBC%20Driver%2017.4.1%3C%2FLI%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%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EunixODBC%3C%2FA%3E%26lt%3B%202.3.7%3C%2FLI%3E%3CLI%3EWhen%20pooling%20is%20enabled%20in%20Linux%20or%20macOS%3CUL%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%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%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehere%3C%2FA%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%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%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23674%3C%2FA%3E)%3C%2FLI%3E%3C%2FUL%3E%3CH3%20id%3D%22toc-hId-1747925837%22%20id%3D%22toc-hId-1747925867%22%3ESurvey%3C%2FH3%3E%3CP%3ELet%20us%20know%20how%20we%20are%20doing%20and%20how%20you%20use%20our%20drivers%20by%20taking%20our%20%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fmssqlphpsurvey%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Epulse%20survey%3C%2FA%3E.%3C%2FP%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3CH3%20id%3D%22toc-hId--804231124%22%20id%3D%22toc-hId--804231094%22%3EInstall%3C%2FH3%3E%3CUL%3E%3CLI%3EOn%20Linux%20and%20macOS%20run%20the%20commands%20below%3A%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Esudo%20pecl%20install%20sqlsrv-5.7.0preview%0Asudo%20pecl%20install%20pdo_sqlsrv-5.7.0preview%E2%80%8B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CUL%3E%3CLI%3ETo%20download%20Windows%20DLLs%20for%20PHP%207.1%20or%20above%20from%20the%20PECL%20repository%2C%20please%20navigate%20to%20%3CA%20href%3D%22https%3A%2F%2Fpecl.php.net%2Fpackage%2Fsqlsrv%2F5.7.0preview%2Fwindows%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3ESQLSRV%3C%2FA%3Eor%20%3CA%20href%3D%22https%3A%2F%2Fpecl.php.net%2Fpackage%2Fpdo_sqlsrv%2F5.7.0preview%2Fwindows%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EPDO_SQLSRV%3C%2FA%3E.%3C%2FLI%3E%3CLI%3EDirect%20downloads%20for%20released%20binaries%20can%20also%20be%20found%20at%20the%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Freleases%2Ftag%2Fv5.7.0-preview%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3EGithub%20release%20tag%3C%2FA%3E.%3C%2FLI%3E%3C%2FUL%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-849451%22%20slang%3D%22en-US%22%3E%3CP%3EWe%20recently%20released%20the%20next%20preview%20of%20the%20Microsoft%20Drivers%20for%20PHP%20for%20SQL%20Server%2C%20version%205.7.0-preview.%20This%20preview%20release%20has%20been%20built%20with%20PHP%207.1%2B%20and%20tested%20on%20all%20supported%20platforms.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-849451%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESQLServerDrivers%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Senior Member

We recently released the next preview of the Microsoft Drivers for PHP for SQL Server, version 5.7.0-preview. This preview release has been built with PHP 7.1+ and tested on all supported platforms.

 

Notable items about this release include:

Added

Removed

  • Dropped support for Ubuntu 18.10

Fixed

  • Issue #570 - Fixed fetching varbinary data using client buffer with sqlsrv
  • Pull Request #972 - Removed redundant calls to retrieve the number of columns or rows in the current query result set
  • Pull Request #978 - PDO_SQLSRV implementation of PDO::getColumnMeta now references cached metadata rather than making an ODBC call every time
  • Pull Request #979 - Added support for data classification Sensitivity metadata retrieval
  • Pull Request #985 - Fixed memory issues with data classification data structures
  • Issue #432 - Having any invalid UTF-8 name in the connection string will no longer invoke misleading error messages
  • Issue #909 - Fixed potential exception with locale issues in macOS
  • Pull Request #992 - Produced the correct error when requesting Data Classification metadata with ODBC drivers prior to 17
  • Pull Request #1001 - Fixed compilation issue with PHP 7.4 alpha
  • Pull Request #1004 - Fixed another compilation issue with PHP 7.4 alpha
  • Pull Request #1008 - Improved data caching when fetching datetime objects
  • Pull Request #1011 - Fixed a potential buffer overflow when parsing for escaped braces in the connection string
  • Pull Request #1015 - Fixed compilation issues and addressed various memory leaks detected by PHP 7.4 beta 1

Limitations

  • No support for inout / output params when using sql_variant type
  • No support for inout / output params when formatting decimal values
  • 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

  • Data Classification metadata retrieval is not compatible with ODBC Driver 17.4.1
  • 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)

Survey

Let us know how we are doing and how you use our drivers by taking our pulse survey.

 

Install

  • On Linux and macOS run the commands below:

 

 

 

sudo pecl install sqlsrv-5.7.0preview
sudo pecl install pdo_sqlsrv-5.7.0preview​

 

 

 

  • To download Windows DLLs for PHP 7.1 or above from the PECL repository, please navigate to SQLSRV or PDO_SQLSRV.
  • Direct downloads for released binaries can also be found at the Github release tag.