Development

How Microsoft Made PHP Suck Less on Windows

July 29, 2009, 06:50 PM — 

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: What's "Linux on the Desktop" Mean, When We Don't Know What a Desktop Is, Anymore? ]

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

Sign up for ITworld's Daily newsletter
Follow ITworld on Twitter @IT_world

I like it!
Comments

It runs faster but won't work on win 2000

Improved but now php only runs on Windows XP SP2+


http://bugs.php.net/bug.php?id=48761

| reply

PHP Suck Less on Windows

PHP on IIS ???
You'd better use PHP on Apache !!!
Works fine on Windows :-)
| reply

PHP on Windows with Apache

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 :-)
| reply
peer-to-peer

Esther Schindler
If the comments are ugly, the code is ugly

claird
SVG a graphics format for 21st century

pasmith
Take Chrome OS for a test spin

Sandra Henry-Stocker
Solaris Tip: Have Your Files Changed Since Installation?

sjvn
64-bits of protection?

jfruh
Android fragments vs. the iPhone monolith

mikelgan
What Gizmodo missed about the Pro WX Wireless USB disk drive

 

Sidekick: The Good News & the Bad News
Either way you look at it Microsoft Data Center management did not follow standards or best practices in this failure. In which case it makes me wonder more about the outsourcing of corporate data much less personal data.
- mburton325

Join the conversation here

The Daily Tip

The Daily TipQuick, practical advice for IT pros. Made fresh daily.

Hot tips:

Want to cash in on your IT savvy? Send your tip to tips@itworld.com. If we post it, we'll send you a $25 Amazon e-gift card.

Newsletters

Subscribe to ITWORLD TODAY and receive the latest IT news and analysis.

I would like to receive offers via email from ITworld partners.
By clicking submit you agree to the terms and conditions outlined in ITworld's privacy policy.
Featured Sponsor

AISO founders envisioned a Web hosting company that was environmentally friendly. While the company employed energy-efficient innovations like solar panels, its infrastructure produced unacceptable power and cooling requirements. Find out how AISO leveraged AMD technology to overcome their challenge in this case study white paper.

In this whitepaper, Scalar explores the opportunity to change the landscape with respect to mission critical databases built around Oracle. Leveraging technologies such as Linux, high-end commodity processing power and Oracle RAC technology to architect, design, build and maintain database infrastructure that delivers maximum availability, reliability and performance at a fraction of traditional cost.

On a typical day, weather.com, the Web site for The Weather Channel in Atlanta, serves up between 15 million and 20 million page views. But in September 2004, when back-to-back hurricanes ransacked Florida, the peak traffic on one day more than tripled: over 70 million page views by more than 7 million unique visitors. Read the full success story now.

Marketplace