KEMBAR78
Windows Server and Fast CGI Technologies For PHP | PPTX
Windows Server & FastCGI technologies for PHPTim KellerLead DeveloperUmoya Networks · www.umoya.netDTL318
PHP GATECRASHESA MICROSOFT EVENT
PHP at a Microsoft eventWhat on earth?A Microsoft Primer for PHP developersA PHPPrimer for Microsoftdevelopers(more likely, since this is TechEd)Either way, welcome! Thanks for coming.
Who am ITim Keller (@timkelleror  timk.co.za)Your typical Mac/Linux typeLead Developer of a PHP-based cloud hosted tool for teachers and school admins, called staffroomMicrosoft-friendlyHI, I’M TIM KELLERLEAD PHP DEVELOPERwww.mystaffroom.nettim@mystaffroom.net
GoalsGood intensionsShow you some cool stuffTell you where you can get itTell you where you can learn moreAnswer questionsGo have a beer with all of you
Stuff we’ll talk about6 things. Simple.Microsoft and OpensourcePHP and IISPowershell for IISSQL Server Driver for PHPMicrosoft Ajax LibrarySilverlight and PHP
TAG TWEETS WITH#techedsa2009FOLLOW MEtwitter.com/timkeller
Microsoft and OpenSource
DeniaLIt’s not just a river in Egypt.
Microsoft and OpenSourceSurprising perhapsMS Redmond OSS labStaffed by OSS and Linux experts300 servers of varying types340+ Linux distros available for testingTests interoperability of OSS and WindowsResearch of OSS technologies
Microsoft and OpenSourceSurprising perhapsProjects so far…Firefox Silverlight supportSilverlight/Moonlight common standardVista Firefox compatibilityFastCGI hosting of PHP and Python on IISSQL Server drivers for PHP and Java
Microsoft and OpenSourceSurprising perhapsActive and Future projectsPHP Active Directory integrationPHP SharePoint integrationSugarCRM SQL Server connectivityWindows - Apache build support/research
Why PHP anyway?
BraverYWounds Heal.  Chicks dig scars. Glory lasts forever.
PHP Web Applications
PHP Web Frameworks
Commercial sites using PHP
HARD TO IGNORE.
PHP on Windows, with IIS
PHP on WindowsIt’s actually been around for a long timeMost PHP developers:Develop on WindowsDeploy to Linux, BSD, *nix.Perception that PHP on IIS sucks (this was true)Often install Apache for Dev or Production
Performance vs. Reliability
FastCGI: Pooling and CachingHTTP Requestindex.phpPHPPHPHTTP Requestlogin.phpPHPPHPFastCGI process pool for PHP5PHP processes are reused.No process creation overhead = 20x performance increaseHTTP Requestheader.php
IIS7+ FastCGI HandlerBasic ArchitectureFastCGI process pool for PHP5IIS Worker ProcessFastCGI protocol over named pipes or TCPphp-cgi.exeFastCGI process pool for PHP4Request queuephp.exe
CommunitYYou’d be surprised what you can accomplish when you work with people who have common goals and ideals.
2006Zend and Microsoft announce collaboration2007Zend and PHP Core Devs start optimising PHP5.2.x builds for windows. FastCGI extensions for IIS6.2008MS release IIS7 with native FastCGI for PHP.
2008Microsoft’s Pierre Joye and the PHP community conduct major work on the PHP 5.3 codebase.Fixed 60+ Windows-specific bugsUpdated every library to latest version (some were 10+ years old)Compiled PHP with VC++ 9 (VS 2008)x86 and x64 builds for Windows
2009Microsoft release IIS 7.5 builds with Windows 7 and Server 2008 R2  builds.Zend ships Zend Core for Windows with Microsoft’s FastCGI implementation
Popular Web Servers (June ‘09)IIS7IIS6IIS5Courtesy:Netcraft Web Server Survey, June 2009.
Where to get all thisPHP and FastCGI goodnessIIS 6 (Windows Server 2003)http://www.iis.net/phpIIS 7 (Windows Vista SP1 and Server 2008)Ships with the product.Activate the CGI feature through Server ManagerIIS 7.5 (Windows 7 and Server 2008R2)Supports Failed Request Tracing for FastCGI (PHP)
Setting up PHP on Windows & IISTim KellerLead DeveloperUmoya Networksdemo
Mission impossiblEWait…what?
PHP Developers want:Multiple versions of PHP on one server.
Real-world PHPTim KellerLead DeveloperUmoya Networksdemo
URL RewritingEver used mod_rewrite in Apache?http://timk.co.za/index.php?type=post&id=34becomes http://timk.co.za/post/34IIS7 offers this, without the need for complex Regular Expressions
URL RewriteTim KellerLead DeveloperUmoya Networksdemo
PowerShell and IISPowerful command line for WindowsWith IIS7.5 you can manipulate your IIS config using PowerShellCreate websitesManage SecurityConfigure FastCGIMuch more
SQL Server and PHPAn INNER JOIN made in heaven?Simple GoalTo provide robust, scalable, and reliable SQL Server connectivity to PHP developers targeting the Windows platform.Built by Microsoft with community feedbackVersion 1.0 released July 2008http://blogs.msdn.com/sqlphp/Microsoft working with SugarCRM (PHP app)
ASP.NET AJAX and PHPTake back the web, sorta.
What is AJAX?Traditional Client/ServerAJAX ParadigmUser InterfaceUser InterfaceAjax EngineRequestResponseWeb ServerWeb Server
What AJAX (sometimes) meansDHTML: HTML + JavascriptAnimationsDrag and DropShow and HidePartial page updatesUser interface makes background calls to serverAJA* : XML, HTML, Text, JSON…
ASP.NET AJAXA library in three partsMS Ajax LibraryJavascript files for the frontendASP.Net Ajax ExtensionsServer-side .NET codeASP.Net Ajax Control Toolkit Shared-source components The PHP MS AJAX library was released in 2008.  http://codeplex.com/phpmsajax
ASP.NET AJAX with PHPTim KellerLead DeveloperUmoya Networksdemo
Silverlight from PHP
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="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> 	<TextBlock>Hello World!</TextBlock> </Canvas>
Silverlight from PHPTim KellerLead DeveloperUmoya Networksdemo
InteroperabilityIt’s about building relationships for the common good.
Call to actionWe want you!EnableFastCGI in IIS7Install PHPGrab some cool PHP appsTell your friends how great PHP is on IIS.Tweet about it!
Session ResourcesWeb Platform Installerhttp://tinyurl.com/mswebplatformURL Rewrite in IIS7http://www.iis.net/extensions/URLRewritePHP on Windows centralhttp://www.iis.net/phpPHP builds and sourcecode for Windowshttp://windows.php.netMicrosoft AJAX for PHPwww.codeplex.com/phpmsajaxSilverlightwww.silverlight.net and http://tinyurl.com/sl3released
question & answer
Required SlideSpeakers, 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:  www.tech-ed.co.zawww.microsoft.com/techedInternational Content & Communitywww.microsoft.com/learningMicrosoft Certification & Training Resourceshttp://microsoft.com/technetResources for IT Professionalshttp://microsoft.com/msdnResources for DevelopersResources
Related ContentRequired SlideSpeakers, 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 SessionsWTB216 – Web Development Whiteboard Discussion (Tuesday, 13:15-14:15, Room C1)
Required Slide10 pairs of MP3 sunglasses to be wonComplete a session evaluation and enter to win!
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.

Windows Server and Fast CGI Technologies For PHP

  • 3.
    Windows Server &FastCGI technologies for PHPTim KellerLead DeveloperUmoya Networks · www.umoya.netDTL318
  • 4.
  • 5.
    PHP at aMicrosoft eventWhat on earth?A Microsoft Primer for PHP developersA PHPPrimer for Microsoftdevelopers(more likely, since this is TechEd)Either way, welcome! Thanks for coming.
  • 6.
    Who am ITimKeller (@timkelleror timk.co.za)Your typical Mac/Linux typeLead Developer of a PHP-based cloud hosted tool for teachers and school admins, called staffroomMicrosoft-friendlyHI, I’M TIM KELLERLEAD PHP DEVELOPERwww.mystaffroom.nettim@mystaffroom.net
  • 7.
    GoalsGood intensionsShow yousome cool stuffTell you where you can get itTell you where you can learn moreAnswer questionsGo have a beer with all of you
  • 8.
    Stuff we’ll talkabout6 things. Simple.Microsoft and OpensourcePHP and IISPowershell for IISSQL Server Driver for PHPMicrosoft Ajax LibrarySilverlight and PHP
  • 9.
    TAG TWEETS WITH#techedsa2009FOLLOWMEtwitter.com/timkeller
  • 10.
  • 11.
    DeniaLIt’s not justa river in Egypt.
  • 12.
    Microsoft and OpenSourceSurprisingperhapsMS Redmond OSS labStaffed by OSS and Linux experts300 servers of varying types340+ Linux distros available for testingTests interoperability of OSS and WindowsResearch of OSS technologies
  • 13.
    Microsoft and OpenSourceSurprisingperhapsProjects so far…Firefox Silverlight supportSilverlight/Moonlight common standardVista Firefox compatibilityFastCGI hosting of PHP and Python on IISSQL Server drivers for PHP and Java
  • 14.
    Microsoft and OpenSourceSurprisingperhapsActive and Future projectsPHP Active Directory integrationPHP SharePoint integrationSugarCRM SQL Server connectivityWindows - Apache build support/research
  • 15.
  • 16.
    BraverYWounds Heal. Chicks dig scars. Glory lasts forever.
  • 17.
  • 18.
  • 19.
  • 21.
  • 23.
  • 24.
    PHP on WindowsIt’sactually been around for a long timeMost PHP developers:Develop on WindowsDeploy to Linux, BSD, *nix.Perception that PHP on IIS sucks (this was true)Often install Apache for Dev or Production
  • 25.
  • 26.
    FastCGI: Pooling andCachingHTTP Requestindex.phpPHPPHPHTTP Requestlogin.phpPHPPHPFastCGI process pool for PHP5PHP processes are reused.No process creation overhead = 20x performance increaseHTTP Requestheader.php
  • 27.
    IIS7+ FastCGI HandlerBasicArchitectureFastCGI process pool for PHP5IIS Worker ProcessFastCGI protocol over named pipes or TCPphp-cgi.exeFastCGI process pool for PHP4Request queuephp.exe
  • 28.
    CommunitYYou’d be surprisedwhat you can accomplish when you work with people who have common goals and ideals.
  • 29.
    2006Zend and Microsoftannounce collaboration2007Zend 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 Joyeand the PHP community conduct major work on the PHP 5.3 codebase.Fixed 60+ Windows-specific bugsUpdated every library to latest version (some were 10+ years old)Compiled PHP with VC++ 9 (VS 2008)x86 and x64 builds for Windows
  • 31.
    2009Microsoft release IIS7.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)IIS7IIS6IIS5Courtesy:Netcraft Web Server Survey, June 2009.
  • 33.
    Where to getall thisPHP and FastCGI goodnessIIS 6 (Windows Server 2003)http://www.iis.net/phpIIS 7 (Windows Vista SP1 and Server 2008)Ships with the product.Activate the CGI feature through Server ManagerIIS 7.5 (Windows 7 and Server 2008R2)Supports Failed Request Tracing for FastCGI (PHP)
  • 34.
    Setting up PHPon Windows & IISTim KellerLead DeveloperUmoya Networksdemo
  • 35.
  • 36.
    PHP Developers want:Multipleversions of PHP on one server.
  • 37.
    Real-world PHPTim KellerLeadDeveloperUmoya Networksdemo
  • 38.
    URL RewritingEver usedmod_rewrite in Apache?http://timk.co.za/index.php?type=post&id=34becomes http://timk.co.za/post/34IIS7 offers this, without the need for complex Regular Expressions
  • 39.
    URL RewriteTim KellerLeadDeveloperUmoya Networksdemo
  • 40.
    PowerShell and IISPowerfulcommand line for WindowsWith IIS7.5 you can manipulate your IIS config using PowerShellCreate websitesManage SecurityConfigure FastCGIMuch more
  • 41.
    SQL Server andPHPAn INNER JOIN made in heaven?Simple GoalTo provide robust, scalable, and reliable SQL Server connectivity to PHP developers targeting the Windows platform.Built by Microsoft with community feedbackVersion 1.0 released July 2008http://blogs.msdn.com/sqlphp/Microsoft working with SugarCRM (PHP app)
  • 42.
    ASP.NET AJAX andPHPTake back the web, sorta.
  • 43.
    What is AJAX?TraditionalClient/ServerAJAX ParadigmUser InterfaceUser InterfaceAjax EngineRequestResponseWeb ServerWeb Server
  • 44.
    What AJAX (sometimes)meansDHTML: HTML + JavascriptAnimationsDrag and DropShow and HidePartial page updatesUser interface makes background calls to serverAJA* : XML, HTML, Text, JSON…
  • 45.
    ASP.NET AJAXA libraryin three partsMS Ajax LibraryJavascript files for the frontendASP.Net Ajax ExtensionsServer-side .NET codeASP.Net Ajax Control Toolkit Shared-source components The PHP MS AJAX library was released in 2008. http://codeplex.com/phpmsajax
  • 46.
    ASP.NET AJAX withPHPTim KellerLead DeveloperUmoya Networksdemo
  • 47.
  • 48.
    Hi, haaaave youmet 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="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> <TextBlock>Hello World!</TextBlock> </Canvas>
  • 49.
    Silverlight from PHPTimKellerLead DeveloperUmoya Networksdemo
  • 50.
    InteroperabilityIt’s about buildingrelationships for the common good.
  • 51.
    Call to actionWewant you!EnableFastCGI in IIS7Install PHPGrab some cool PHP appsTell your friends how great PHP is on IIS.Tweet about it!
  • 52.
    Session ResourcesWeb PlatformInstallerhttp://tinyurl.com/mswebplatformURL Rewrite in IIS7http://www.iis.net/extensions/URLRewritePHP on Windows centralhttp://www.iis.net/phpPHP builds and sourcecode for Windowshttp://windows.php.netMicrosoft AJAX for PHPwww.codeplex.com/phpmsajaxSilverlightwww.silverlight.net and http://tinyurl.com/sl3released
  • 53.
  • 54.
    Required SlideSpeakers, TechEd2009 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: www.tech-ed.co.zawww.microsoft.com/techedInternational Content & Communitywww.microsoft.com/learningMicrosoft Certification & Training Resourceshttp://microsoft.com/technetResources for IT Professionalshttp://microsoft.com/msdnResources for DevelopersResources
  • 55.
    Related ContentRequired SlideSpeakers,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 SessionsWTB216 – Web Development Whiteboard Discussion (Tuesday, 13:15-14:15, Room C1)
  • 56.
    Required Slide10 pairsof MP3 sunglasses to be wonComplete a session evaluation and enter to win!
  • 57.
    Required Slide© 2009Microsoft 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.

Editor's Notes

  • #4 Met a couple of speakers in the lift last night… said I was doing the PHP talk… yeah…
  • #11 Q: Why are you here?
  • #12 For the longest time, Microsoft ignored OpenSource
  • #13 But that’s changed
  • #26 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
  • #30 Multiple versionsWordpressURLRewriting
  • #31 Multiple versionsWordpressURLRewriting