SQL Server Driver for PHP 2.0 CTP2 is now released

It is our pleasure to announce the release of Community Technology Preview 2 (CTP2) of the SQL Server Driver for PHP 2.0!

We would like to thank all who provided feedback and bug reports on our CTP1 release (April 19th) the SQLSRV (our native API) and PDO_SQLSRV drivers. Last week we shared our plans for our next CTP in our blog, and today we are happy that we were able to achieve our release criteria earlier than we anticipated.

To recap, here are the changes in this release:

  • Code completely re-architected with the functional core layer and the API layers
  • SQLSRV driver is rebuilt with the code re-architected (no new features)
  • PDO::__construct(): a design change from CTP1, Connection Options now need to be specified in the DSN string instead of the driver_options[] array
  • PDO::SQLSRV_ATTR_DIRECT_QUERY: new custom driver attribute to provide more flexibility to the developer
    • Ability to execute two queries within the same context or different contexts, useful when using temporary tables or other circumstances
    • Ability to bind parameters for queries within the same context
  • Errors are now encoded per the setting of CharacterSet / PDO::SQLSRV_ATTR_ENCODING
  • Bug fixes to SQLSRV as well as PDO_SQLSRV drivers
  • Our documentation now includes a new example application using the PDO_SQLSRV driver

We will always include both drivers in our releases from now onwards, and our CTP2 package is available for download on MSDN Download Center. As we blogged yesterday on what we mean by a CTP release, this CTP is the last one for this version as we have made the design changes required. We are working thru our internal processes to publish the source code, and we plan to release it with our final version.

At this point, we anticipate a relatively short feedback period of 4 to 6 weeks. We want these drivers to meet your needs and expectations, so we invite you to download it to give both drivers a good workout and report any issues you run into!

Note: the CTP2 binaries are currently available on the MSDN Download Center only; that is, the binaries in our Web Platform Installer will be updated after their testing is completed.

As always, we continue to actively monitor our MSDN forum and this blog to listen and respond to your feedback.


SQL Server Driver for PHP team

Comments (10)
  1. Do you know of a web hosting services that has this PHP driver?

  2. @Brandon: since this is a pre-final release, we don't believe any web hosting provider has deployed it.

  3. I hope you'll document what changes are required in our PHP code (if any) to migrate from version 1. Unluckily, we don't always have the time to explore new library versions.

  4. Alvaro-

    I wrote about the code changes here: blogs.msdn.com/…/ctp2-of-microsoft-driver-for-php-for-sql-server-released.aspx

    The documentation has more information: msdn.microsoft.com/…/ee229548(SQL.10).aspx

    Let us know if those resources aren't what you need.



  5. Alvaro – we posted a blog before the CTP2 release on what changes we are making, especially what we call "breaking changes" (meaning that developers will have to modify their code to use the new version). Brian's post built on that information with some code snippets demonstrating the changes required.

    If none of those changes apply to you, then you should be able to just replace the binary with the new one and test. While we did not intend to make any breaking changes, some regressions may have slipped thru when we refactored the code to support PDO. We'd love to hear from you if you run into problems when you simply replace the v1.1 binary with the equivalent v2.0 CTP2 and run your tests.



  6. Of course, I'll read the full docs before upgrading anything (they're excellent anyway). But I was thinking about something less verbose, a quick summary on the line of:

    Migrating from 1.1 to 2.0:

    – Method foo() no longer accepts an array as second parameter.

    – Function bar() has been deprecated; use gee() instead.

    Migrating from 2.0 to 2.1:

    – …

    If official MSDN documentation has such info, it's pretty hidden.

  7. Now I see what you mean Alvaro. Good suggestion, thanks!

    For now, Brian's blog has the API changes with sample code (not as succinct as you'd like) for changes between CTP1 & CTP2.

  8. Michael says:

    Do you know how to use this driver to connect to SQL Server 2000? Could you give an example, please?

  9. Hi Michael,

    This driver has a dependency on SQL Server Native Access Client 2008 which support SQL Server 2005 and later. SQL Server 2000 is not supported.

  10. SQL Lion says:

    T-SQL RowNumber() vs Rank() vs DenseRank() vs NTILE() | SQL Lion

    SQL Server comes with some magical words that make simple the life of a developer or DBA to a great extent. And these magic words are RowNumber(), Rank(), DenseRank() and NTile(). Follow the link to get more…


Comments are closed.

Skip to main content