Your SlideShare is downloading. ×
Windows Server and Fast CGI Technologies For PHP
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Windows Server and Fast CGI Technologies For PHP

24,774
views

Published 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)

Published in: Technology

1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total Views
24,774
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
1
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
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
  • Transcript

    • 1.
    • 2.
    • 3. Windows Server & FastCGI technologies for PHP
      Tim Keller
      Lead Developer
      Umoya Networks · www.umoya.net
      DTL318
    • 4. PHP GATECRASHES
      A MICROSOFT EVENT
    • 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 timk.co.za)
      Your typical Mac/Linux type
      Lead Developer of a PHP-based cloud hosted tool for teachers and school admins, called staffroom
      Microsoft-friendly
      HI, I’M TIM KELLER
      LEAD PHP DEVELOPER
      www.mystaffroom.net
      tim@mystaffroom.net
    • 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
    • 9. TAG TWEETS WITH
      #techedsa2009
      FOLLOW ME
      twitter.com/timkeller
    • 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.
    • 21. HARD TO IGNORE.
    • 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
      index.php
      PHP
      PHP
      HTTP Request
      login.php
      PHP
      PHP
      FastCGI process pool for PHP5
      PHP processes are reused.
      No process creation overhead = 20x performance increase
      HTTP Request
      header.php
    • 27. IIS7+ FastCGI HandlerBasic Architecture
      FastCGI process pool for PHP5
      IIS Worker Process
      FastCGI protocol over named pipes or TCP
      php-cgi.exe
      FastCGI process pool for PHP4
      Request queue
      php.exe
    • 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)
      IIS7
      IIS6
      IIS5
      Courtesy:Netcraft Web Server Survey, June 2009.
    • 33. Where to get all thisPHP and FastCGI goodness
      IIS 6 (Windows Server 2003)
      http://www.iis.net/php
      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
      demo
    • 35. Mission impossiblE
      Wait…what?
    • 36. PHP Developers want:
      Multiple versions of PHP on one server.
    • 37. Real-world PHP
      Tim Keller
      Lead Developer
      Umoya Networks
      demo
    • 38. URL Rewriting
      Ever used mod_rewrite in Apache?
      http://timk.co.za/index.php?type=post&id=34becomes http://timk.co.za/post/34
      IIS7 offers this, without the need for complex Regular Expressions
    • 39. URL Rewrite
      Tim Keller
      Lead Developer
      Umoya Networks
      demo
    • 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
      http://blogs.msdn.com/sqlphp/
      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
      Request
      Response
      Web Server
      Web Server
    • 44. What AJAX (sometimes) means
      DHTML: HTML + Javascript
      Animations
      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. http://codeplex.com/phpmsajax
    • 46. ASP.NET AJAX with PHP
      Tim Keller
      Lead Developer
      Umoya Networks
      demo
    • 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="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> <TextBlock>Hello World!</TextBlock>
      </Canvas>
    • 49. Silverlight from PHP
      Tim Keller
      Lead Developer
      Umoya Networks
      demo
    • 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 Installerhttp://tinyurl.com/mswebplatform
      URL Rewrite in IIS7
      http://www.iis.net/extensions/URLRewrite
      PHP on Windows central
      http://www.iis.net/php
      PHP builds and sourcecode for Windows
      http://windows.php.net
      Microsoft AJAX for PHP
      www.codeplex.com/phpmsajax
      Silverlight
      www.silverlight.net and http://tinyurl.com/sl3released
    • 53. question & answer
    • 54. Required Slide
      Speakers,
      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.za
      www.microsoft.com/teched
      International Content & Community
      www.microsoft.com/learning
      Microsoft Certification & Training Resources
      http://microsoft.com/technet
      Resources for IT Professionals
      http://microsoft.com/msdn
      Resources for Developers
      Resources
    • 55. Related Content
      Required Slide
      Speakers,
      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.

    ×