Windows Server and Fast CGI Technologies For PHP

Uploaded on

PHP is a wildly popular scripting language for the web, and powers some of the largest websites on the Internet. Traditionally, PHP on Windows has been something of an oxymoron. …

PHP is a wildly popular scripting language for the web, and powers some of the largest websites on the Internet. Traditionally, PHP on Windows has been something of an oxymoron.

Join us and find out why PHP is now highly performant, scalable and efficient when run under FastCGI on Windows Server and IIS. Presented by a local PHP developer, you'll gain insight into how you can take advantage of PHP on Windows, and integrate it with technologies like PowerShell, ASP.NET and SQLServer.

Originally presented at Microsoft TechEd Africa 2009 (August 3, 2009)

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
No Downloads


Total Views
On Slideshare
From Embeds
Number of Embeds



Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

    No notes for slide
  • Met a couple of speakers in the lift last night… said I was doing the PHP talk… yeah…
  • Q: Why are you here?
  • For the longest time, Microsoft ignored OpenSource
  • But that’s changed
  • PHP Community develop on Windows (Zend Studio, etc) but DEPLOY to LinuxWindows = Performance vs. Reliability issueWindows: Heavy to start a process, light to start a threadLinux: Light to start a process, heavy to start a process
  • Multiple versionsWordpressURLRewriting
  • Multiple versionsWordpressURLRewriting


  • 1.
  • 2.
  • 3. Windows Server & FastCGI technologies for PHP
    Tim Keller
    Lead Developer
    Umoya Networks ·
  • 5. PHP at a Microsoft eventWhat on earth?
    A Microsoft Primer for PHP developers
    A PHPPrimer for Microsoftdevelopers(more likely, since this is TechEd)
    Either way, welcome! Thanks for coming.
  • 6. Who am ITim Keller (@timkelleror
    Your typical Mac/Linux type
    Lead Developer of a PHP-based cloud hosted tool for teachers and school admins, called staffroom
  • 7. GoalsGood intensions
    Show you some cool stuff
    Tell you where you can get it
    Tell you where you can learn more
    Answer questions
    Go have a beer with all of you
  • 8. Stuff we’ll talk about6 things. Simple.
    Microsoft and Opensource
    PHP and IIS
    Powershell for IIS
    SQL Server Driver for PHP
    Microsoft Ajax Library
    Silverlight and PHP
  • 10. Microsoft and OpenSource
  • 11. DeniaL
    It’s not just a river in Egypt.
  • 12. Microsoft and OpenSourceSurprising perhaps
    MS Redmond OSS lab
    Staffed by OSS and Linux experts
    300 servers of varying types
    340+ Linux distros available for testing
    Tests interoperability of OSS and Windows
    Research of OSS technologies
  • 13. Microsoft and OpenSourceSurprising perhaps
    Projects so far…
    Firefox Silverlight support
    Silverlight/Moonlight common standard
    Vista Firefox compatibility
    FastCGI hosting of PHP and Python on IIS
    SQL Server drivers for PHP and Java
  • 14. Microsoft and OpenSourceSurprising perhaps
    Active and Future projects
    PHP Active Directory integration
    PHP SharePoint integration
    SugarCRM SQL Server connectivity
    Windows - Apache build support/research
  • 15. Why PHP anyway?
  • 16. BraverY
    Wounds Heal. Chicks dig scars. Glory lasts forever.
  • 17. PHP Web Applications
  • 18. PHP Web Frameworks
  • 19. Commercial sites using PHP
  • 20.
  • 22.
  • 23. PHP on Windows, with IIS
  • 24. PHP on WindowsIt’s actually been around for a long time
    Most PHP developers:
    Develop on Windows
    Deploy to Linux, BSD, *nix.
    Perception that PHP on IIS sucks (this was true)
    Often install Apache for Dev or Production
  • 25. Performance vs. Reliability
  • 26. FastCGI: Pooling and Caching
    HTTP Request
    HTTP Request
    FastCGI process pool for PHP5
    PHP processes are reused.
    No process creation overhead = 20x performance increase
    HTTP Request
  • 27. IIS7+ FastCGI HandlerBasic Architecture
    FastCGI process pool for PHP5
    IIS Worker Process
    FastCGI protocol over named pipes or TCP
    FastCGI process pool for PHP4
    Request queue
  • 28. CommunitY
    You’d be surprised what you can accomplish when you work with people who have common goals and ideals.
  • 29. 2006Zend and Microsoft announce collaboration
    2007Zend and PHP Core Devs start optimising PHP5.2.x builds for windows. FastCGI extensions for IIS6.
    2008MS release IIS7 with native FastCGI for PHP.
  • 30. 2008Microsoft’s Pierre Joye and the PHP community conduct major work on the PHP 5.3 codebase.
    Fixed 60+ Windows-specific bugs
    Updated every library to latest version (some were 10+ years old)
    Compiled PHP with VC++ 9 (VS 2008)
    x86 and x64 builds for Windows
  • 31. 2009
    Microsoft release IIS 7.5 builds with Windows 7 and Server 2008 R2 builds.
    Zend ships Zend Core for Windows with Microsoft’s FastCGI implementation
  • 32. Popular Web Servers (June ‘09)
    Courtesy:Netcraft Web Server Survey, June 2009.
  • 33. Where to get all thisPHP and FastCGI goodness
    IIS 6 (Windows Server 2003)
    IIS 7 (Windows Vista SP1 and Server 2008)
    Ships with the product.
    Activate the CGI feature through Server Manager
    IIS 7.5 (Windows 7 and Server 2008R2)
    Supports Failed Request Tracing for FastCGI (PHP)
  • 34. Setting up PHP on Windows & IIS
    Tim Keller
    Lead Developer
    Umoya Networks
  • 35. Mission impossiblE
  • 36. PHP Developers want:
    Multiple versions of PHP on one server.
  • 37. Real-world PHP
    Tim Keller
    Lead Developer
    Umoya Networks
  • 38. URL Rewriting
    Ever used mod_rewrite in Apache?
    IIS7 offers this, without the need for complex Regular Expressions
  • 39. URL Rewrite
    Tim Keller
    Lead Developer
    Umoya Networks
  • 40. PowerShell and IIS
    Powerful command line for Windows
    With IIS7.5 you can manipulate your IIS config using PowerShell
    Create websites
    Manage Security
    Configure FastCGI
    Much more
  • 41. SQL Server and PHPAn INNER JOIN made in heaven?
    Simple Goal
    To provide robust, scalable, and reliable SQL Server connectivity to PHP developers targeting the Windows platform.
    Built by Microsoft with community feedback
    Version 1.0 released July 2008
    Microsoft working with SugarCRM (PHP app)
  • 42. ASP.NET AJAX and PHP
    Take back the web, sorta.
  • 43. What is AJAX?
    Traditional Client/Server
    AJAX Paradigm
    User Interface
    User Interface
    Ajax Engine
    Web Server
    Web Server
  • 44. What AJAX (sometimes) means
    DHTML: HTML + Javascript
    Drag and Drop
    Show and Hide
    Partial page updates
    User interface makes background calls to server
    AJA* : XML, HTML, Text, JSON…
  • 45. ASP.NET AJAX
    A library in three parts
    MS Ajax LibraryJavascript files for the frontend
    ASP.Net Ajax ExtensionsServer-side .NET code
    ASP.Net Ajax Control Toolkit Shared-source components
    The PHP MS AJAX library was released in 2008.
  • 46. ASP.NET AJAX with PHP
    Tim Keller
    Lead Developer
    Umoya Networks
  • 47. Silverlight from PHP
  • 48. Hi, haaaave you met XAML?
    XML-based description of a Rich User Interface.
    Part of the Windows Presentation Foundation.
    PHP can easily output text/xml.
    XAML also supports UI Events. Which is cool.
    <Canvas xmlns=""> <TextBlock>Hello World!</TextBlock>
  • 49. Silverlight from PHP
    Tim Keller
    Lead Developer
    Umoya Networks
  • 50. Interoperability
    It’s about building relationships for the common good.
  • 51. Call to actionWe want you!
    EnableFastCGI in IIS7
    Install PHP
    Grab some cool PHP apps
    Tell your friends how great PHP is on IIS.
    Tweet about it!
  • 52. Session Resources
    Web Platform Installer
    URL Rewrite in IIS7
    PHP on Windows central
    PHP builds and sourcecode for Windows
    Microsoft AJAX for PHP
    Silverlight and
  • 53. question & answer
  • 54. Required Slide
    TechEd 2009 is not producing
    a DVD. Please announce that
    attendees can access session
    recordings from Tech-Ed website. These will only be available after the event.
    Tech·Ed Africa 2009 sessions will be made available for download the week after the event from:
    International Content & Community
    Microsoft Certification & Training Resources
    Resources for IT Professionals
    Resources for Developers
  • 55. Related Content
    Required Slide
    please list the Breakout Sessions, TLC Interactive Theaters and Labs that are related to your session. Any queries, please check with your Track Owner.
    Breakout Sessions
    WUX301 – Microsoft Codename Velocity (Mon, 15:45, C3)
    DTL302 – Embrace OpenSource on CodePlex(Tues, 12:00, A3)
    WSV309 – What’s new in Server Core for Windows Server 2008 (Tues, 14:30, D5)
    WUX302 – ASP.NET Under the covers (Tues, 17:30, C3)
    Whiteboard Sessions
    WTB216 – Web Development Whiteboard Discussion (Tuesday, 13:15-14:15, Room C1)
  • 56. Required Slide
    10 pairs of MP3 sunglasses to be won
    Complete a session evaluation and enter to win!
  • 57. Required Slide
    © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
    The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.