%3CLINGO-SUB%20id%3D%22lingo-sub-1747408%22%20slang%3D%22en-US%22%3EMicrosoft%20Drivers%205.9.0%20Preview%201%20for%20PHP%20for%20SQL%20Server%20Released%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1747408%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.9.0-preview1.%20This%20preview%20release%20has%20been%20built%20with%20PHP%207.2%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%3CP%3E%26nbsp%3B%3C%2FP%3E%3CH3%20id%3D%22toc-hId-1257230932%22%20id%3D%22toc-hId-1257231017%22%3EAdded%3C%2FH3%3E%3CUL%3E%3CLI%3ESupport%20for%20PHP%208.0%20RC%201%3C%2FLI%3E%3CLI%3ESupport%20for%20Ubuntu%2020.04%20and%20Alpine%203.12%3C%2FLI%3E%3CLI%3ESupport%20for%20GB18030%20locale%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F1115%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%231115%3C%2FA%3E%3C%2FLI%3E%3CLI%3EFeature%20Request%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fissues%2F924%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23924%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-%20extended%20PDO%20errorinfo%20to%20include%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fwiki%2FFeatures%23pdoErrorInfo%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eadditional%20odbc%20messages%20if%20available%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-%20pull%20request%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F1133%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%231133%3C%2FA%3E%3C%2FLI%3E%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fwiki%2FFeatures%23dataClass%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EData%20Classification%20with%20rank%20info%3C%2FA%3E%2C%20which%20requires%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Faka.ms%2Fdownloadmsodbcsql%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EMS%20ODBC%20Driver%2017.4.2%2B%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eand%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fsql-server%2Fsql-server-2019%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3ESQL%20Server%202019%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eor%20an%20Azure%20SQL%20instance%20that%20supports%20it%3C%2FLI%3E%3C%2FUL%3E%3CH3%20id%3D%22toc-hId--550223531%22%20id%3D%22toc-hId--550223446%22%3ERemoved%3C%2FH3%3E%3CUL%3E%3CLI%3EDropped%20support%20for%20Ubuntu%2019.10%20and%20Debian%208.%3C%2FLI%3E%3C%2FUL%3E%3CH3%20id%3D%22toc-hId-1937289302%22%20id%3D%22toc-hId-1937289387%22%3EFixed%3C%2FH3%3E%3CUL%3E%3CLI%3EPull%20Request%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F1127%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%231127%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-%20removal%20of%20TSRMLS%20macros%20in%20preparation%20for%20PHP%208%20by%20remicollet%3C%2FLI%3E%3CLI%3EPull%20Request%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F1136%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%231136%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-%20improved%20performance%20when%20handling%20decimal%20numbers%20as%20inputs%20or%20outputs%20and%20removed%20unncessary%20conversions%20for%20numeric%20values%3C%2FLI%3E%3CLI%3EPull%20Request%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F1143%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%231143%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-%20if%20an%20exception%20occurs%20when%20executing%20a%20query%2C%20will%20not%20change%20the%20output%20parameters%3C%2FLI%3E%3CLI%3EPull%20Request%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F1144%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%231144%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-%20use%20the%20correct%20C%20types%20when%20binding%20output%20parameters%20with%20integer%20values%3C%2FLI%3E%3CLI%3EPull%20Request%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F1146%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%231146%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-%20improved%20performance%20when%20fetching%20numbers%20using%20client%20buffers%3C%2FLI%3E%3CLI%3EPull%20Request%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F1165%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%231165%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-%20setting%20query%20timeout%20without%20using%20LOCK%20TIMEOUT%2C%20which%20saves%20an%20extra%20trip%20to%20the%20server%3C%2FLI%3E%3CLI%3EIssue%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fissues%2F1170%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%231170%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-%20when%20fetching%20large%20data%20types%20such%20as%20ntext%20will%20check%20more%20than%20only%20the%20display%20size%20-%20pull%20request%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fpull%2F1172%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%231172%3C%2FA%3E%3C%2FLI%3E%3C%2FUL%3E%3CH3%20id%3D%22toc-hId-129834839%22%20id%3D%22toc-hId-129834924%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%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%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%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%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%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-%20With%20Always%20Encrypted%20enabled%2C%20named%20parameters%20in%20subqueries%20are%20not%20supported%3C%2FLI%3E%3CLI%3EIssue%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmsphpsql%2Fissues%2F1050%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%231050%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E-%20With%20Always%20Encrypted%20enabled%2C%20insertion%20requires%20the%20column%20list%20for%20any%20tables%20with%20identity%20columns%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--1677619624%22%20id%3D%22toc-hId--1677619539%22%3EKnown%20Issues%3C%2FH3%3E%3CUL%3E%3CLI%3EThis%20preview%20release%20requires%20ODBC%20Driver%2017.4.2%20or%20above.%20Otherwise%2C%20a%20warning%20about%20failing%20to%20set%20an%20attribute%20may%20be%20suppressed%20when%20using%20an%20older%20ODBC%20driver.%3C%2FLI%3E%3CLI%3EConnection%20pooling%20on%20Linux%20or%20macOS%20is%20not%20recommended%20with%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22http%3A%2F%2Fwww.unixodbc.org%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EunixODBC%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%26lt%3B%202.3.7%3C%2FLI%3E%3CLI%3EWhen%20pooling%20is%20enabled%20in%20Linux%20or%20macOS%3A%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%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%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%3C%2FUL%3E%3CH3%20id%3D%22toc-hId-809893209%22%20id%3D%22toc-hId-809893294%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--997561254%22%20id%3D%22toc-hId--997561169%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%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3Esudo%20pecl%20install%20sqlsrv-5.9.0preview1%0Asudo%20pecl%20install%20pdo_sqlsrv-5.9.0preview%E2%80%8B1%3C%2FCODE%3E%3C%2FPRE%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.2%20or%20above%20from%20the%20PECL%20repository%2C%20please%20navigate%20to%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fpecl.php.net%2Fpackage%2Fsqlsrv%2F5.9.0preview1%2Fwindows%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3ESQLSRV%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eor%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fpecl.php.net%2Fpackage%2Fpdo_sqlsrv%2F5.9.0preview1%2Fwindows%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%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.9.0-preview1%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%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDavid%20Engel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1747408%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.9.0-preview1.%20This%20preview%20release%20has%20been%20built%20with%20PHP%207.2%2B%20and%20tested%20on%20all%20supported%20platforms.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1747408%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.9.0-preview1. This preview release has been built with PHP 7.2+ and tested on all supported platforms.

 

Notable items about this release include:

 

Added

Removed

  • Dropped support for Ubuntu 19.10 and Debian 8.

Fixed

  • Pull Request #1127 - removal of TSRMLS macros in preparation for PHP 8 by remicollet
  • Pull Request #1136 - improved performance when handling decimal numbers as inputs or outputs and removed unncessary conversions for numeric values
  • Pull Request #1143 - if an exception occurs when executing a query, will not change the output parameters
  • Pull Request #1144 - use the correct C types when binding output parameters with integer values
  • Pull Request #1146 - improved performance when fetching numbers using client buffers
  • Pull Request #1165 - setting query timeout without using LOCK TIMEOUT, which saves an extra trip to the server
  • Issue #1170 - when fetching large data types such as ntext will check more than only the display size - pull request #1172

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
    • Issue #1050 - With Always Encrypted enabled, insertion requires the column list for any tables with identity columns
    • Always Encrypted limitations

Known Issues

  • This preview release requires ODBC Driver 17.4.2 or above. Otherwise, a warning about failing to set an attribute may be suppressed when using an older ODBC driver.
  • 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.

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.9.0preview1
sudo pecl install pdo_sqlsrv-5.9.0preview​1

 

 

  • To download Windows DLLs for PHP 7.2 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.

 

David Engel