How Microsoft Made PHP Suck Less on Windows
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
Sign up for ITworld's Daily newsletter
Follow ITworld on Twitter @IT_world
Brian Proffitt
Microsoft/Novell: Breaking Down the Coupon Numbers
Esther Schindler
Drupal's Dries Buytaert on Building the Next Drupal
Tom Henderson
Top Ten General Operating Systems Rants
pasmith
PS3 motion controller delayed; goes up against Project Natal
sjvn
Neolithic Windows security hole alive and well in Windows 7
claird
Perl source code comparison makes for good reading
mikelgan
Cell phones don't create stress or interrupt much
Sandra Henry-Stocker
How to: The Unix Interview
Where Google Chrome security fails: the password
I heard mention that the Chrome OS will have some sort of encryption available a la bitlocker. If it's possible to encrypt personal data using another password or key, then it may have potential for very secure data.... And Ubuntu has an 'encrypt home directory' option, perhaps google should follow suit.
- Dann
Join the conversation here
Quick, practical advice for IT pros. Made fresh daily.
- Ubuntu advances: Why Ubuntu server installations will surge in 2010
- Social media marketing: How to make friends with benefits
- More...
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.







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
PHP Suck Less on Windows
PHP on IIS ???You'd better use PHP on Apache !!!
Works fine on Windows :-)
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 :-)