Freigeben über


Reflecting on PHP-Microsoft Interoperability

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…

2006

  • 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).

2007

  • 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.

2008

  • 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.

2009

2010

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.

Thanks.

-Brian

Share this on Twitter

Comments

  • Anonymous
    October 07, 2010
    PHP on Windows has come so far! Thank you to everyone who has helped this effort. WebPI and SQLSrv are fantastic and I've just started playing with the PHP Manager which is looking good so far.I can now sell PHP solutions to my MS-centric clients confident that PHP will work great and my client's IT depts are happy that PHP is going to work well. I've said this before, but this effort has opened up new markets to my company and we've sold PHP to places where Java was the original choice.I'm looking forward to seeing where we go!Regards,Rob...
  • Anonymous
    October 07, 2010
    Hi Brian,I started my current job about 3 years ago, just about where your timeline begins - it marked the first time I'd used PHP on Windows and I found it something of a chore! Back then we were quite limited with what we could achieve with Windows because, as you said, support for PHP in the Microsoft stack was lacking.Trying to develop a cross-platform application that performed equally in both  *nix and Windows environments was a major challenge that usually required a lot of ifs(), elses() and why????()s, whereas nowadays I've found much less environment-specific code needs to be written. Makes development quicker and a lot less stressful!I agree that the way things are headed is great. I like the PI but find it's not suited to the way I work - I'd like greater control over which version of PHP is installed, with maybe the ability to run a few different versions side by side or at least switch easily between them - I have to use 4 (uurgh), 5.2.x and now 5.3. (I haven't tried the PI in a while, so apologies if this is now possible!).What are the chances of Microsoft becoming involved with PECL and providing some resource for the automated building of DLLs for those extensions? The more common extensions are thankfully supported at Pierre's website but innovation on Windows is hampered because while I can build the less common extensions from source, I can't guarantee others can which makes using them a risk.Have to say that I and the others I work with are most grateful for the recent improvements, and hope that they continue!Cheers,Craig
  • Anonymous
    October 08, 2010
    @Rob: That's great to hear! Good to know our efforts are making things better for folks.@Craig: Also great to hear! As far as the Web PI goes, the lack of multiple PHP versions is clearly a shortcoming. I know that the Web PI team is aware of this and hopes to have multi-version support eventually...I just don't know when (although I don't think they have plans to support PHP 4...how important is that for you?).Regarding MS providing a resouce for automated building of PECL extensions...quite honestly, I don't know. However, you are not the first person to request/suggest such a resource. Personally, I think it's a great idea, and the more we hear that folks want this, the more likely it is to happen. I'll keep on it.
  • Anonymous
    October 08, 2010
    That's good to hear (multiple PHP versions) - if I were them I wouldn't want to add support for 4 either! Better to encourage people to move to 5. Thankfully I don't have to use 4 much these days, I'd be happy to run it in a VM and have a better PHP5 experience through the PI. PECL support would be fab, please do!
  • Anonymous
    October 12, 2010
    The comment has been removed
  • Anonymous
    October 15, 2010
    Thanks, Dominic. After reading your comments and your blog post (www.iis-aid.com/.../looking_back_php_iis) I realized I didn't paint (or even know) the complete picture. Thanks for sharing.Cheers,Brian