Está en la página 1de 32

 SilverCamp Presents…

Make Web Not War


PHP + IIS +
Silverlight
TC Wu featuring Rohan Thomas
PHP + IIS
Best of Both Worlds
Same platform – one source of solution

Crossover platform – richer solution


across

 +

Best of Both Worlds



Best of Both Worlds


Best of Both Worlds



Consolidation
Less platform = less servers + less
conflict = less maintenance +
problem = less headache / busy

 =
Efficiency = Free time/piece of mind =
plan for betterment / improvement of
process = Productivity/Work-life
balance
Consolidation = Savings
 Get More out of Less
Less Servers = Green
Protocol: FastCGI

CGI - interfacing external applications


to web servers

FastCGI reduces overhead associated


with interfacing the web server and
CGI programs
by reusing a single process over and over again for
many requests

Allows a server to handle more web


page requests at once
Protocol: FastCGI

Why not CGI or ISAPI?


Integrated support with IIS 7.0 and Fast CGI
CGI – Stable but too slow
starting and shutting down a process for each request
ISAPI – Slower than FastCGI
internal to the web server process

Upcoming improvements to FastCGI


Real time tuning of system based on system load
and number of requests waiting
Recycle PHP processes on changes to php.ini
Tracing – better debugging for PHP developers
Step 1: Turn On CGI & FastCGI
Windows 2008:
Server Manager > Roles > Add Role Services
Web Server > App. Dev. > Tick CGI

Windows Vista SP1:


Control Panel > Programs and Features > Turn
Windows features on or off
WWW Services > App. Dev. Features > Tick CGI

Update KB954946:
For PHP application that depends on the
REQUEST_URI server variable
Step 2:
Install & Configure PHP

Download:
www.php.net/downloads.php
Get non-thread safe version
No thread-safety checks - not necessary, since
FastCGI ensures a single threaded execution
environment
Significant performance gains over the standard
build

After Installation:
Rename the php.ini-recommended to php.ini
Step 2:
Set parameters in php.ini

Set fastcgi.impersonate = 1
impersonate security tokens of the calling client
to define the security context that the request runs under.

Set cgi.fix_pathinfo=1
cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED
support for CGI
PHP's previous behavior was to set PATH_TRANSLATED to
SCRIPT_FILENAME, and to not care what PATH_INFO is

Set cgi.force_redirect = 0.

Step 2:
..and to finish it off

Set extension_dir to point to a location where


PHP extensions reside.
Typically, for PHP 5.2.X that would be set as
extension_dir = "./ext"

Enable the required PHP extension by un-


commenting corresponding lines, for
example:
extension=php_mssql.dll
extension=php_mysql.dll
Step 3:
Configure IIS 7.0 to Handle PHP
Requests
IIS7 > PCName ( PCName\Administrator) >
Handler Mappings

Step 3: Finally
Test the site

Create Phpinfo.php inside


C:\inetpub\wwwroot
<?php phpinfo(); ?>

Http://localhost/php/Phpinfo.php

Web PI : Platform Installer

Fastest & Easiest way to Install PHP on IIS

Automates Installation & Configures for you

No longer have manually configure & set


parameters
Web PI : Web Platform

Installer
Automates Installation

Web Tools
Silverlight 2 Tools, Visual Web Dev. 2008 Express
Servers
IIS Management & Configuration Extensions
Database
SQL Server 2008
Framework
ASP.NET, PHP


Web PI : Web Apps Gallery
12 Web Apps & still counting...

DotNetNuke – interactive web site & app. builder

Wordpress – blog tool & publishing platform

Acquia Drupal – dynamic & social web site builder

Gallery – web based photo gallery

ScrewTurn Wiki – ASP.NET based kb/wiki software


Web PI : Takes care
Ensures it's the latest version before it
installs
Software up-to-date checks

Takes care of the order of installation /


prerequisites

All using the same installer: Web PI


 Demo
Web P.I

Special appearance by Rohan Thomas


 Demo
PHP + IIS +
Silverlight
Special appearance by Rohan Thomas
Microsoft Open Source Technology Center
Microsoft and the PHP Community
Before Now
No Core developer working Creation of the Windows Internals
on or for Windows Team
Windows

is now a primary platform
2 core developers
 7 regular helpers, contributors or testers
Windows was a 2nd class (growing)
platform Synchronized releases
QA on Windows
 5.2.6, 5.2.7, 5.2.8, 5.3.0 beta
 95%of the core tests pass on Windows
Binaries releases days or Dedicated communication channels
 Mailing list, Windows internal list,
weeks after the sources iis.net/php(http://www.php.net/mailing-
releases lists.php)
Absence QA on Windows  IRC channel on freenode #php-dev-win

Lack of documentation and


communication
Links
Web PI :
www.microsoft.com/web OR
php.iis.net

PHP Manual install & configure:


learn.iis.net

Microsoft Open Source Community:


port25.technet.com
Home to open source community at MS
Open source interoperatibility
Contact
Name: TC Wu
Position: Lead Software Engineer
Twitter: @kaizenx
Blog: www.norecursion.com
Email: tc.wu@titoonic-asia.com
HP: 012-3358389
© 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.

También podría gustarte