• Save
Windows Server and Fast CGI Technologies For PHP
Upcoming SlideShare
Loading in...5
×
 

Windows Server and Fast CGI Technologies For PHP

on

  • 20,726 views

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)

Statistics

Views

Total Views
20,726
Views on SlideShare
20,697
Embed Views
29

Actions

Likes
1
Downloads
0
Comments
1

5 Embeds 29

http://timk.co.za 17
http://www.slideshare.net 7
http://www.timokeller.net 2
http://timkeller.me 2
http://timokeller.net 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 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

Windows Server and Fast CGI Technologies For PHP Windows Server and Fast CGI Technologies For PHP Presentation Transcript

  • Windows Server & FastCGI technologies for PHP
    Tim Keller
    Lead Developer
    Umoya Networks · www.umoya.net
    DTL318
  • PHP GATECRASHES
    A MICROSOFT EVENT
  • 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.
  • 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
  • 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
  • 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
  • TAG TWEETS WITH
    #techedsa2009
    FOLLOW ME
    twitter.com/timkeller
  • Microsoft and OpenSource
  • DeniaL
    It’s not just a river in Egypt.
  • 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
  • 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
  • Microsoft and OpenSourceSurprising perhaps
    Active and Future projects
    PHP Active Directory integration
    PHP SharePoint integration
    SugarCRM SQL Server connectivity
    Windows - Apache build support/research
  • Why PHP anyway?
  • BraverY
    Wounds 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 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
  • Performance vs. Reliability
  • 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
  • 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
  • CommunitY
    You’d be surprised what you can accomplish when you work with people who have common goals and ideals.
  • 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.
  • 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
  • 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
  • Popular Web Servers (June ‘09)
    IIS7
    IIS6
    IIS5
    Courtesy:Netcraft Web Server Survey, June 2009.
  • 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)
  • Setting up PHP on Windows & IIS
    Tim Keller
    Lead Developer
    Umoya Networks
    demo
  • Mission impossiblE
    Wait…what?
  • PHP Developers want:
    Multiple versions of PHP on one server.
  • Real-world PHP
    Tim Keller
    Lead Developer
    Umoya Networks
    demo
  • 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
  • URL Rewrite
    Tim Keller
    Lead Developer
    Umoya Networks
    demo
  • 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
  • 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)
  • ASP.NET AJAX and PHP
    Take back the web, sorta.
  • What is AJAX?
    Traditional Client/Server
    AJAX Paradigm
    User Interface
    User Interface
    Ajax Engine
    Request
    Response
    Web Server
    Web Server
  • 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…
  • 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
  • ASP.NET AJAX with PHP
    Tim Keller
    Lead Developer
    Umoya Networks
    demo
  • 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 PHP
    Tim Keller
    Lead Developer
    Umoya Networks
    demo
  • Interoperability
    It’s about building relationships for the common good.
  • 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!
  • 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
  • question & answer
  • 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
  • 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)
  • Required Slide
    10 pairs of MP3 sunglasses to be won
    Complete 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.