How Microsoft Made PHP Suck Less on Windows

By Esther Schindler  5 comments

As yet another demonstration of Microsoft's seriousness about participating in the open source community, it's hard at work to make PHP run better (dare we say really well?) on Windows. During last week's Open Source Convention, I spoke with the dude in charge of making that happen.

[ See also: Convincing the Boss to Accept FOSS ]

For years, PHP developers might develop on Windows but never deploy on Windows. And for good reason, explains Garrett Serack, the open source software developer at Microsoft who's involved with the company's Open Source Technology Center. "If you banged on [a PHP application] too hard on Windows, IIS would crash, and nobody could tell why it died," he says. The existing PHP driver was based on old protocols; its performance was "not great" because, Serack says, the PHP community lacked the technical information necessary to improve it.

As you might imagine, that presented a problem for Microsoft, since its own developers knew that a third of Web applications are written in PHP, Serack says. When the company realized that developers weren't using PHP on Windows because really, they couldn't, some inside Microsoft were ready to make a change. Doing so has consumed most of Serack's time ever since. (You can find links to the latest PHP for Windows code at windows.php.net.)

The first to encourage PHP-on-Windows improvements was the SQL Server team, which wanted to enhance existing open source applications to work better with the SQL Server drivers. (That is, they would like developers deploying PHP apps on Windows to use SQL Server rather than MySQL, or at least to consider doing so without generating gales of derisive laughter.) The first new-and-improved PHP drivers for Windows were released in October 2007. The open source community said — in a nice way, Serack insists — "Your driver sucks." So the SQL Server team went back and redid it, in direct response to what people actually wanted.

Naturally, the team wanted to release the code changes back to the community. Explains Serack, that meant a lot of conversations with Microsoft's legal counsel to get permission to contribute the code. Developing a legal process took months, since releasing code as open source is still a very new idea to the company. But it's not a unique challenge; as Serack points out, "Every large company that has contributed to open source has developed a [legal] process similar to this."

Anyway, at last year's OSCON Microsoft submitted code to ADOdb (a database abstraction layer for PHP) and a couple of others. "About this time last year, the folks in the Open Source Software Lab wanted to accelerate the development of PHP on Windows," Serack says. Pierre Joye (already a PHP committer) had some free time, so Microsoft enabled him to work (with Serack) on the specific goal: improving PHP on Windows.

Meanwhile, Serack got started by improving the Windows PHP build process by scripting it from scratch. As with so many other projects, he had to build tools to build more tools. "I wanted to include all the DLLs," he says. He built a trace tool to track what was being built, and created brand-new Visual Studio project files. "No more make files and custom batch scripts!" Serack sighs happily.

Follow ITworld on Twitter: @IT_world

5 comments

    Anonymous 2 years ago
    Made for each other, just like Laurel and Hardy.
    Anonymous 2 years ago
    I've never experienced any problems with PHP running on Windows using Apache. Perhaps Microsoft's time is better spent making IIS run better on Windows :-)
    Anonymous 2 years ago
    PHP on IIS ???You'd better use PHP on Apache !!!Works fine on Windows :-)
    Anonymous 2 years ago
    Improved but now php only runs on Windows XP SP2+http://bugs.php.net/bug.php?id=48761

      Add a comment

      Post a comment using one of these accounts
      Or join now
      At least 6 characters

      Note: Comment will appear soon after you have activated your account.
      Obscene/spam comments will be removed and accounts suspended.
      The information you submit is subject to our Privacy Policy and Terms of Service.

      ITworld LIVE

      DevelopmentWhite Papers & Webcasts

      White Paper

      HP NonStop SQL Fundamentals whitepaper

      This whitepaper offers a detailed look into the fundamentals of HP NonStop SQL solutions. See how this system delivers unprecedented levels of application availability with fail-safe data integrity and meets the needs of enterprises with large-scale business critical applications.

      White Paper

      Nebraska Medical Center case study

      See how the Nebraska Medical Center implemented a SQL solution to make information more readily available to streamline operations, improve patient care and facilitate medical research with an enterprise solution running on HP NonStop servers.

      White Paper

      Concepts of NonStop SQL/MX

      For DBAs and developers who are familiar with Oracle solutions and want to learn about NonStop SQL/MX, this whitepaper provides an overview of the similarities and differences between the two products-with a specific focus on implementation.

      White Paper

      6 Things Your CIO Needs to Know About Requirements

      If your organization is not predictably successful on technology projects, there is likely an issue in requirements. CIOs must take action and own requirements maturity improvement. There are 6 main things a CIO must know about requirements.

      Webcast On Demand

      User Experience Monitoring

      In this webinar, you will learn hints & tips for improving end-user response times from Forrester Research analyst, Jean-Pierre Garbani.

      Sponsor: Nimsoft

      See more White Papers | Webcasts

      Answers - Powered by ITworld

      Ask a question

      Ask a Question