This morning I came across this article on PHPDeveloper.org: Blast from the Past – One Year Ago in PHP. That brief look into the past got me to thinking about what Microsoft has done lately toward PHP interoperability. (By “lately”, I mean in the last few years.) And, I’ve been working on a presentation for TechEd in Berlin next month that will, in part, provide a brief overview of Microsoft’s efforts toward PHP interoperability and support. So, I thought I’d share a bit of that summary here…
- Running PHP on Windows/IIS/SQL Server was not really an option. PHP itself was optimized for running on Linux, IIS was using CGI to handle PHP requests (which meant an entire PHP process spun up/torn down for each PHP request!), and access to SQL Server was mainly achieved through the php_mssql extension (which was based on deprecated DBLib technology).
- The IIS team implemented FastCgi to handle PHP requests. In retrospect, this may have been the single biggest step toward improving PHP performance on Windows/IIS. Now, multiple PHP processes could handle PHP requests and the these processes could be recycled without being torn down.
- The SQL Server Driver for PHP 1.0 was released. This driver was built as a thin wrapper of SQL Native Access Client (SNAC), Microsoft’s implementation of ODBC. SNAC is the state-of-the-art Win32 access to SQL Server. Engineers are constantly improving and testing SNAC code, so building a PHP driver on top of it made for a highly efficient, feature-rich driver. And, the source code for the driver was released under an open source license.
- The IIS team also introduced the URL Rewrite Module for IIS, a highly requested feature aimed at enabling SEO-friendly URLs.
- PHP 5.3 was released with several Windows-specific optimizations: PHP was available in a VC9-compiled version, the POSIX layer was removed and the Win32 API was called directly, and every dependent library was built from source code. These changes greatly improved the performance of PHP on Windows.
- The IIS team released the Windows Cache Extension for PHP (WinCache) v1.0. The extension was an opcode, file, and resolved path cache that enabled yet another performance improvement for PHP on Windows/IIS.
- The SQL Server Driver for PHP 1.1 was released. This release included several highly-requested features, including scrollable result sets, built-in UTF-8 support, and SQL Azure support.
- The Web Platform Installer (Web PI) v1.0 was released. In a nutshell, this tool went a long way toward improving the installation and configuration of PHP on Windows.
- The Web Application Gallery was launched. This site made installing any number of PHP applications on Windows as easy as a few clicks.
- The Microsoft Interoperability Team, in conjunction with some folks outside of Microsoft, began releasing SDKs for PHP developers. Highlights for 2009 include the Windows Azure SDK for PHP and the AppFabric SDK for PHP.
- WinCache 1.1 was released. This release included the ability to store application data in shared memory and was function-by-function compatible with APC.
- The Microsoft Drivers for SQL Server for PHP were released. The major leap here was support for PDO.
- Web PI 3.0 was released with more tooling and framework options. More applications were available in the Web Application Gallery.
- The Interoperability Team continued to work with PHP community members to release SDKs for PHP developers (in addition to updating and maintaining previous released SDKs). Highlights for 2010 include the SSRS SDK for PHP, the OData SDK for PHP, Windows Azure Command Line Tools for PHP, Windows Azure Storage for WordPress, and the Bing Search Library for PHP. The Interop team also worked closely with Soyatec to get Windows Azure tooling support into Eclipse.
- Ruslan Yakushev (PM on the IIS team) released the IIS team released the PHP Manager for IIS 7. This IIS plug-in makes configuring, optimizing, and running multiple versions of PHP on IIS very easy.
And that really just covers the highlights. I haven’t mentioned all of the community-contributed projects on CodePlex.com, the many PHP applications that have added or are adding SQL Server support, or the work that I know is in progress but can’t talk about yet. 🙁
Do we still have work to do? Absolutely. Lots of work. But I like the trajectory and the momentum. What do you think? Are we heading in the right direction? Why or why not? I’d love to hear others’ perceptions of the recent history of PHP-Microsoft interoperability and thoughts about future direction.