Contributions to the PHP Engine

I am always amazed at the passion and energy that open source contributors put into what is often their “night job” after whatever they do to pay the bills. It is that passion that has driven a vibrant community of PHP open source applications that ranges from on-line learning to shopping carts. Those PHP applications are in turn driving the development of Web sites all over the world.

We want to ensure that Windows Server is a first class platform for those PHP Web sites and applications. We took the first step in this direction with IIS6 and IIS7, which is part of Windows Server and the Windows client operating systems. We provided a critical platform component called FastCGI. FastCGI first shipped as a Web download for IIS6 in November 2007 and is also included as part of the IIS installation in Windows Server 2008 and later. FastCGI provides reliable hosting of PHP applications with better performance than any previous Windows Server operating system. This app hosting support in the Microsoft Web platform was the first step towards making sure that PHP applications could run as a first-class citizen on IIS.

Then we built URL Rewrite to provide developers with the same type of support for canonical host names and control over URL writing as mod_rewrite but with an easier management experience. We also launched the Web Application Gallery and Web Platform Installer, which make it easy for users to discover, download, and install open source community applications (PHP and ASP.NET) with Web Deployment Tool integration on Windows Server 2003, Windows Server 2008, Windows Server 2008 R2, Windows XP, Windows Vista, and Windows 7. We work with the Windows installer community for PHP so that the latest non-thread-safe version of production-ready PHP configures FastCGI automatically on install. We also include the latest production version of the PHP as an option for users to download and install using our Web Platform Installer so that apps can be installed with the required PHP dependency.

All of these investments in PHP support tie back to our engagement goals, which are:
1. Make it easy to install PHP on Windows Server
2. Make it easy to find and deploy top community PHP apps on Windows Server

We are now focusing an important third goal that we started with our FastCGI support:
3. Make sure that PHP applications run well on Windows Server

The PHP core and extensions started and have evolved on Linux. In the last couple of years, with the support of a growing PHP on Windows Server community led by Pierre Joye and the Microsoft Open Source Technology Center, we have seen the community focus more and more on how that core and extensions run and perform on Windows Server. The fruits of that labor is the first PHP release optimized for Windows Server, PHP 5.3. RC1 which released on March 27th, 2009

Significant functional and performance improvements specific to Windows Server have been made in the upcoming PHP 5.3 release.

In particular, the community has implemented the following improvements:

  • Recompiled PHP with Visual C++ v 9.0, which improved the performance of the PHP core significantly.
  • Both 32bit and 64bit builds (64 bit builds expiramentalexperimental until PHP 5.4/6.0) of PHP have been made available.
  • Optimized the PHP implementation to take advantage of native Win32 APIs, instead of relying on POSIX emulation libraries
  • Fixed the standard PHP test suite, which now has a much higher pass rate on Windows Server
  • All PHP libraries have been fixed to be built from the source code. 10 years old libraries have been updated to newest versions.
  • Build environment for PHP on Windows Server has been standardized and now it is easy for anyone to rebuild the exact same PHP stack on Windows Server as the release build.

In addition to that, there is greater integration for Windows Server development in the PHP community with PHP on Windows Server is now treated by the community as first class platform. Some specific examples:

  • PHP versions for Windows Server are released at the same time as other platforms.
  • Builds are available on the same day as the source releases.
  • The PHP security mailing list now includes has developers with Windows expertise.

The next step is to focus on PHP on Windows Server Fundamentals – making sure that PHP installs and configures correctly without regressing functionality or performance as part of the transfer on Windows Server. We are focusing on PHP on Windows Server Fundamentals to help the Windows Server on PHP open source community. Our goal with engaging with the PHP Core community is to improve PHP’s performance and integration with Windows Server.

Our engineering team has started to contribute directly to the PHP on Windows code base by helping out with bug fixing functions in PHP 5.3 that work on Linux and break on Windows...specifically, we fixed the _nan() function so that developers can use it to see if a math function returned a proper value or not, and workely closed with Pierre to fix and test the is_readable/is_writeable functions to work with Windows ACLs. These two code fixes are just the starting point for us -- our engineering team will continue working with Pierre and the PHP on Windows community by tuning performance, fixing bugs, and contributing code to improve specific PHP components that have issues running on the Windows Server platform. 

We also want to provide specific Windows Server expertise to the PHP app community and to help fix issues with some of the most popular PHP applications that surface on Windows Server. For example, we contributed a fix to WordPress for dynamic URL rewriting for "pretty URLs" with IIS URL Rewrite on Windows Server that was accepted in the WordPress 2.8 code branch.

Our goal with all of these contributions is to help improve the performance of PHP on Windows Server and with other Microsoft Web platform software. We are freely providing all contributions for use with PHP because we believe that PHP running well out of the box on Windows Server means not just happy Windows Server customers, but also happy PHP developers who can now feel more confident about supporting Windows Server for their projects.

You can stay updated on PHP on Windows Server development by checking the IIS PHP portal or the PHP for Windows site.

    1 Comment

    • This is great news. I was surprised to read that Microsoft is so active in the PHP community, but this is a very good thing. I build nearly everything in ASP.NET but sometimes PHP is the better solution in certain cases and this sort of work makes my life easier!

      Thanks

    Comments have been disabled for this content.