SlideShare a Scribd company logo
 
Jorke Odolphi Microsoft Australia web platform architect evangelist [email_address] @jorke
PHP Developers longzheng
So Bacon has feathers now? Contributing to Open Source Open Specification Promise Apache Software Foundation
IIS Request Processing Server functionality is split into  ~ 40 modules... Modules plug into a generic request pipeline… Modules  extend server functionality   through a public module API. Authorization ResolveCache UpdateCache … … … Monolithic implementation Install  all or nothing … Extend server functionality only through  ISAPI … Send Response Log Compress NTLM Basic Determine  Handler CGI Static File ISAPI Authentication Anon SendResponse Authentication ExecuteHandler ASP.NET PHP
IIS 6.0 ASP.NET Processing Runtime limitations Only sees ASP.NET requests Feature duplication … … … … aspnet_isapi.dll Send Response Log Compress NTLM Basic Determine  Handler CGI Static File ISAPI Authentication Anon Authentication Forms Windows Map Handler ASPX Trace …
IIS6 Application Framework support Common Gateway Interface (CGI) for CGI and PHP applications Benefits Very simple to implement and use – single-threaded execution Disadvantages Poor performance due to high process creation cost Creates and passes request data to a new CGI process Waits for CGI process to produce response Shuts down CGI process
IIS6 Application Framework support Internet Server Application Programming Interface (ISAPI) Benefit of ISAPI Can be extremely fast when written correctly Disadvantage of ISAPI Must be thread-safe (many PHP extensions are not!) Requires development in C++
IIS 7.0 ASP.NET Request Processing Classic Mode runs as ISAPI Integrated Mode .NET modules / handlers plug directly into pipeline Process all requests Full runtime fidelity Authorization ResolveCache UpdateCache … … … … aspnet_isapi.dll Log Compress Basic Static File ISAPI Anon SendResponse Authentication ExecuteHandler Authentication Forms Windows Map Handler ASPX Trace …
New Configuration  NET  global settings .NET Framework  Global web.config machine.config IIS 7 applicationHost.config Site Root web.config <system.web> .NET settings .. <system.webServer> IIS 7 Delegated settings ASP.NET  global settings Global settings  and location tags
PHP Setup
Per-site PHP configuration Configuring FastCGI process pool < fastCgi > < application   fullPath =&quot;C:\PHP\php-cgi.exe&quot;  arguments =&quot;-d my.website=website1&quot;> < environmentVariables > < environmentVariable   name =&quot;PHPRC&quot;  value =&quot;C:\WebSites\website1&quot; /> </ environmentVariables > </ application > </ fastCgi > Combination of  fullPath  and  arguments  uniquely identify FastCGI process pool definition PHPRC environment variable contains path to the php.ini file
Per-site PHP configuration Configuring Handler Mapping < system.webServer > < handlers   accessPolicy =&quot;Read, Script&quot;> < add   name =&quot;PHP via FastCGI&quot;  path =&quot;*.php&quot;  verb =&quot;*&quot;  modules =&quot;FastCgiModule&quot;  scriptProcessor =&quot;C:\PHP\php-cgi.exe|-d my.website=website2&quot; resourceType =&quot;Unspecified&quot;  requireAccess =&quot;Script&quot; /> </ handlers > </ system.webServer > Reference FastCGI process pool by concatenating [fullPath]|[arguments]
PHP Setup Feature Delegation Remote Administration Web Server Core Integration
Thread safe Non Thread Safe
PHP with FastCGI Zend Collaboration Built in Support for Fast CGI Re-use of processes BIG performance boost Thread Safe vs Non Thread Safe Thread Safe Non-Thread Safe
FastCGI Handler Architecture IIS Worker Process Request queue FastCGI process pool for PHP5 php-cgi.exe FastCGI process pool for PHP4 php.exe FastCGI protocol over named pipes or TCP
Best Practices for Running PHP on IIS7 Want to set PHP specific environment variables in the web.config file? Use  environmentVariables  configuration setting to set PHP specific environment variables. <fastCgi> <application fullPath=&quot;C:\PHP\php-cgi.exe&quot;  instanceMaxRequests=“10000&quot;> <environmentVariables>     <environmentVariable  name=”PHP_FCGI_MAX_REQUESTS”  value=”10000”/>     </environmentVariables> </application> </fastCgi>
Best Practices for Running PHP on IIS7 Is your server under so much load that your clients are getting timeout responses? The FastCGI process will be terminated if it does not respond to FastCGI handler within specified time period.  Set the requestTimeout  (number of seconds to wait for process to handle the request) value to be higher than the activityTimeout (number of seconds to wait for any process activity) value. <fastCgi> <application fullPath=&quot;C:\PHP\php-cgi.exe&quot;  activityTimeout=“30&quot;  requestTimeout=“90&quot;/> </fastCgi>
Manage CPU utilization Windows Server Resource Manager (WSRM) Available in all SKU’s of WS2008 Ensures that process gets *at least* the configured CPU percentage Kicks in only if overall CPU load is more than 70% IIS team tested WSRM with 4000 web sites
Performance  Scaling Out WSRM
Performance Best Practices Enable Output Caching for semi-dynamic pages Low bandwidth Branch Offices? Enable Dynamic Compression ( ~ 5% CPU overhead) Need to run many web apps on a single box? Run IIS worker processes in Wow64 mode Room for the OS, scalability for your web apps It’s an per-AppPool setting now: Enable32BitAppOnWow64 Thinking about buying new Web Server hardware? W2K8 scales extremely well on new multi-proc boxes (4 and 8 core) ASP.NET op caching vs. IIS op caching vs. KM output caching
Performance Best Practices 1000s of requests per second? Remove modules you don’t need  You don’t know why some pages are so slow?  Turn on Failed Request Tracing and the “time-taken” feature to investigate You * script-mapped all requests to ASP.NET in IIS6?  Integrated Pipeline is much faster than an IIS6 * scriptmap solution Try together with IIS7 URL Authorization.
Performance Best Practices PHP applications? PHP on top of FastCGI is much faster than traditional CGI The majority of your requests go to your Default Document?  Put it on top of the list Otherwise IIS7 has to check every time Static default documents will be cached in kernel-mode Looking for tools to measures web server performance?  Try WCAT 6.3 from www.iis.net/downloads
Performance Boosting Better compression for static and dynamic Output caching a module Per URL / query string / request headers Huge improvements to allow for high density or high availability
IIS Extensions Mod_rewrite support for URL rewriting
Jorke Odolphi [email_address]
SID Injection AppPool: newPool username: newPoolUser password: <password> LogonUser AccessCheck AccessCheck Service Host (SVCHost.EXE) Windows Process Activation Service (WAS) World Wide Web Service (W3SVC)  applicationhost.config Token Token NewPool\ Wwwroot\ default.htm ACL OK Otherpool\ Wwwroot\ default.htm ACL Denied
Ad

More Related Content

What's hot (20)

Load Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusionLoad Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusion
ColdFusionConference
 
Restful API's with ColdFusion
Restful API's with ColdFusionRestful API's with ColdFusion
Restful API's with ColdFusion
ColdFusionConference
 
FAST for SharePoint Deep Dive
FAST for SharePoint Deep DiveFAST for SharePoint Deep Dive
FAST for SharePoint Deep Dive
neil_richards
 
Building an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAX
Building an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAXBuilding an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAX
Building an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAX
Richard Rabins
 
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataIn The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
Stacy London
 
Hidden gems in cf2016
Hidden gems in cf2016Hidden gems in cf2016
Hidden gems in cf2016
ColdFusionConference
 
Locking Down CF Servers
Locking Down CF ServersLocking Down CF Servers
Locking Down CF Servers
ColdFusionConference
 
ColdFusion builder plugins
ColdFusion builder pluginsColdFusion builder plugins
ColdFusion builder plugins
ColdFusionConference
 
Command Box ColdFusion Package Manager, Automation
Command Box ColdFusion Package Manager, AutomationCommand Box ColdFusion Package Manager, Automation
Command Box ColdFusion Package Manager, Automation
ColdFusionConference
 
10 Reasons ColdFusion PDFs should rule the world
10 Reasons ColdFusion PDFs should rule the world10 Reasons ColdFusion PDFs should rule the world
10 Reasons ColdFusion PDFs should rule the world
ColdFusionConference
 
Asp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework CoreAsp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework Core
mohamed elshafey
 
Running PHP on Windows Technical Overview
Running PHP on Windows Technical OverviewRunning PHP on Windows Technical Overview
Running PHP on Windows Technical Overview
Wes Yanaga
 
Upgrading to Alfresco 6
Upgrading to Alfresco 6Upgrading to Alfresco 6
Upgrading to Alfresco 6
Angel Borroy López
 
Keep Applications Online
Keep Applications OnlineKeep Applications Online
Keep Applications Online
ColdFusionConference
 
Realtime with websockets
Realtime with websocketsRealtime with websockets
Realtime with websockets
ColdFusionConference
 
Expand Your ColdFusion App Power with AWS
Expand Your ColdFusion App Power with AWSExpand Your ColdFusion App Power with AWS
Expand Your ColdFusion App Power with AWS
ColdFusionConference
 
CakePHP and AJAX
CakePHP and AJAXCakePHP and AJAX
CakePHP and AJAX
Mark Scherer
 
What's new in xamarin.android, Jonathan Pryor
What's new in xamarin.android, Jonathan PryorWhat's new in xamarin.android, Jonathan Pryor
What's new in xamarin.android, Jonathan Pryor
Xamarin
 
Migration to ColdFusion 11 – making it seamless and easy anit
Migration to ColdFusion 11 – making it seamless and easy   anitMigration to ColdFusion 11 – making it seamless and easy   anit
Migration to ColdFusion 11 – making it seamless and easy anit
ColdFusionConference
 
Performance Metrics in a Day with Selenium
Performance Metrics in a Day with SeleniumPerformance Metrics in a Day with Selenium
Performance Metrics in a Day with Selenium
Mark Watson
 
Load Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusionLoad Balancing, Failover and Scalability with ColdFusion
Load Balancing, Failover and Scalability with ColdFusion
ColdFusionConference
 
FAST for SharePoint Deep Dive
FAST for SharePoint Deep DiveFAST for SharePoint Deep Dive
FAST for SharePoint Deep Dive
neil_richards
 
Building an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAX
Building an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAXBuilding an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAX
Building an web 2.0 blog RAPIDLY in Alpha Five v10 with Codeless AJAX
Richard Rabins
 
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember DataIn The Trenches With Tomster, Upgrading Ember.js & Ember Data
In The Trenches With Tomster, Upgrading Ember.js & Ember Data
Stacy London
 
Command Box ColdFusion Package Manager, Automation
Command Box ColdFusion Package Manager, AutomationCommand Box ColdFusion Package Manager, Automation
Command Box ColdFusion Package Manager, Automation
ColdFusionConference
 
10 Reasons ColdFusion PDFs should rule the world
10 Reasons ColdFusion PDFs should rule the world10 Reasons ColdFusion PDFs should rule the world
10 Reasons ColdFusion PDFs should rule the world
ColdFusionConference
 
Asp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework CoreAsp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework Core
mohamed elshafey
 
Running PHP on Windows Technical Overview
Running PHP on Windows Technical OverviewRunning PHP on Windows Technical Overview
Running PHP on Windows Technical Overview
Wes Yanaga
 
Expand Your ColdFusion App Power with AWS
Expand Your ColdFusion App Power with AWSExpand Your ColdFusion App Power with AWS
Expand Your ColdFusion App Power with AWS
ColdFusionConference
 
What's new in xamarin.android, Jonathan Pryor
What's new in xamarin.android, Jonathan PryorWhat's new in xamarin.android, Jonathan Pryor
What's new in xamarin.android, Jonathan Pryor
Xamarin
 
Migration to ColdFusion 11 – making it seamless and easy anit
Migration to ColdFusion 11 – making it seamless and easy   anitMigration to ColdFusion 11 – making it seamless and easy   anit
Migration to ColdFusion 11 – making it seamless and easy anit
ColdFusionConference
 
Performance Metrics in a Day with Selenium
Performance Metrics in a Day with SeleniumPerformance Metrics in a Day with Selenium
Performance Metrics in a Day with Selenium
Mark Watson
 

Viewers also liked (20)

Mal D Africa
Mal D AfricaMal D Africa
Mal D Africa
Silvestro
 
OpenDataGarage-Session4-GiorgioPrister-MajorCitiesofEuropeItaly
OpenDataGarage-Session4-GiorgioPrister-MajorCitiesofEuropeItalyOpenDataGarage-Session4-GiorgioPrister-MajorCitiesofEuropeItaly
OpenDataGarage-Session4-GiorgioPrister-MajorCitiesofEuropeItaly
Fing
 
Smart farm white paper chapter 4
Smart farm white paper chapter 4Smart farm white paper chapter 4
Smart farm white paper chapter 4
Pisuth paiboonrat
 
Pre-Leasing for June 2009
Pre-Leasing for June 2009Pre-Leasing for June 2009
Pre-Leasing for June 2009
pede320
 
Presentacion E Fusion
Presentacion E FusionPresentacion E Fusion
Presentacion E Fusion
WSI - Consultores de Internet
 
Proyecto ROTOPLAS en SyBase
Proyecto ROTOPLAS en SyBaseProyecto ROTOPLAS en SyBase
Proyecto ROTOPLAS en SyBase
Andreitap de Granda
 
Book fing eng_light
Book fing eng_lightBook fing eng_light
Book fing eng_light
Fing
 
Resgate de um carro em Portugal
Resgate de um carro em PortugalResgate de um carro em Portugal
Resgate de um carro em Portugal
carolina
 
The Information Experience - RAND Presentation
The Information Experience - RAND PresentationThe Information Experience - RAND Presentation
The Information Experience - RAND Presentation
Sophia Guevara
 
Private company up & comers march 2012 - soho loft
Private company up & comers   march 2012 - soho loftPrivate company up & comers   march 2012 - soho loft
Private company up & comers march 2012 - soho loft
Jason Jones
 
Social Marketing at Scale
Social Marketing at ScaleSocial Marketing at Scale
Social Marketing at Scale
Michael Andreas Hansen
 
Practice Prob Solv Acum Exam
Practice Prob Solv Acum ExamPractice Prob Solv Acum Exam
Practice Prob Solv Acum Exam
rhernandez1971
 
リーダブルコードワークショップ(パイオニア向け)のまとめ
リーダブルコードワークショップ(パイオニア向け)のまとめリーダブルコードワークショップ(パイオニア向け)のまとめ
リーダブルコードワークショップ(パイオニア向け)のまとめ
Kouhei Sutou
 
実践リーダブルコードのまとめ
実践リーダブルコードのまとめ実践リーダブルコードのまとめ
実践リーダブルコードのまとめ
Kouhei Sutou
 
buen regalo
buen regalobuen regalo
buen regalo
Fredy Balaguera
 
Prophet Chart
Prophet ChartProphet Chart
Prophet Chart
BertBrim
 
Embracing Events
Embracing EventsEmbracing Events
Embracing Events
Lourens Naudé
 
OpenDataWeek Marseille 2013 : Luca Gerretta -- Harmonising open data policies...
OpenDataWeek Marseille 2013 : Luca Gerretta -- Harmonising open data policies...OpenDataWeek Marseille 2013 : Luca Gerretta -- Harmonising open data policies...
OpenDataWeek Marseille 2013 : Luca Gerretta -- Harmonising open data policies...
Fing
 
китай пътека от стъкло
китай пътека от стъклокитай пътека от стъкло
китай пътека от стъкло
Canko Balkanski
 
OpenDataWeek Marseille 2013 : Amandine Brugière -- Infolab Campaign
OpenDataWeek Marseille 2013 : Amandine Brugière -- Infolab CampaignOpenDataWeek Marseille 2013 : Amandine Brugière -- Infolab Campaign
OpenDataWeek Marseille 2013 : Amandine Brugière -- Infolab Campaign
Fing
 
OpenDataGarage-Session4-GiorgioPrister-MajorCitiesofEuropeItaly
OpenDataGarage-Session4-GiorgioPrister-MajorCitiesofEuropeItalyOpenDataGarage-Session4-GiorgioPrister-MajorCitiesofEuropeItaly
OpenDataGarage-Session4-GiorgioPrister-MajorCitiesofEuropeItaly
Fing
 
Smart farm white paper chapter 4
Smart farm white paper chapter 4Smart farm white paper chapter 4
Smart farm white paper chapter 4
Pisuth paiboonrat
 
Pre-Leasing for June 2009
Pre-Leasing for June 2009Pre-Leasing for June 2009
Pre-Leasing for June 2009
pede320
 
Book fing eng_light
Book fing eng_lightBook fing eng_light
Book fing eng_light
Fing
 
Resgate de um carro em Portugal
Resgate de um carro em PortugalResgate de um carro em Portugal
Resgate de um carro em Portugal
carolina
 
The Information Experience - RAND Presentation
The Information Experience - RAND PresentationThe Information Experience - RAND Presentation
The Information Experience - RAND Presentation
Sophia Guevara
 
Private company up & comers march 2012 - soho loft
Private company up & comers   march 2012 - soho loftPrivate company up & comers   march 2012 - soho loft
Private company up & comers march 2012 - soho loft
Jason Jones
 
Practice Prob Solv Acum Exam
Practice Prob Solv Acum ExamPractice Prob Solv Acum Exam
Practice Prob Solv Acum Exam
rhernandez1971
 
リーダブルコードワークショップ(パイオニア向け)のまとめ
リーダブルコードワークショップ(パイオニア向け)のまとめリーダブルコードワークショップ(パイオニア向け)のまとめ
リーダブルコードワークショップ(パイオニア向け)のまとめ
Kouhei Sutou
 
実践リーダブルコードのまとめ
実践リーダブルコードのまとめ実践リーダブルコードのまとめ
実践リーダブルコードのまとめ
Kouhei Sutou
 
Prophet Chart
Prophet ChartProphet Chart
Prophet Chart
BertBrim
 
OpenDataWeek Marseille 2013 : Luca Gerretta -- Harmonising open data policies...
OpenDataWeek Marseille 2013 : Luca Gerretta -- Harmonising open data policies...OpenDataWeek Marseille 2013 : Luca Gerretta -- Harmonising open data policies...
OpenDataWeek Marseille 2013 : Luca Gerretta -- Harmonising open data policies...
Fing
 
китай пътека от стъкло
китай пътека от стъклокитай пътека от стъкло
китай пътека от стъкло
Canko Balkanski
 
OpenDataWeek Marseille 2013 : Amandine Brugière -- Infolab Campaign
OpenDataWeek Marseille 2013 : Amandine Brugière -- Infolab CampaignOpenDataWeek Marseille 2013 : Amandine Brugière -- Infolab Campaign
OpenDataWeek Marseille 2013 : Amandine Brugière -- Infolab Campaign
Fing
 
Ad

Similar to PHP on Windows 2008 (20)

Microsoft, PHP and IIS7
Microsoft, PHP and IIS7Microsoft, PHP and IIS7
Microsoft, PHP and IIS7
Nick Hodge
 
PHP and FastCGI Performance Optimizations
PHP and FastCGI Performance OptimizationsPHP and FastCGI Performance Optimizations
PHP and FastCGI Performance Optimizations
Alessandro Pilotti
 
IIS 6.0 and asp.net
IIS 6.0 and asp.netIIS 6.0 and asp.net
IIS 6.0 and asp.net
Rishi Kothari
 
Php Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc JaoPhp Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc Jao
jedt
 
ASP.NET 4.0
ASP.NET 4.0ASP.NET 4.0
ASP.NET 4.0
XeDotNet
 
SharePoint 2010 Boost your farm performance!
SharePoint 2010 Boost your farm performance!SharePoint 2010 Boost your farm performance!
SharePoint 2010 Boost your farm performance!
Brian Culver
 
Philly Tech Fest Iis
Philly Tech Fest IisPhilly Tech Fest Iis
Philly Tech Fest Iis
Springhouse Education and Consulting Services
 
CTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should KnowCTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should Know
Spiffy
 
Web Front End Performance
Web Front End PerformanceWeb Front End Performance
Web Front End Performance
Chris Love
 
10 tips to make your ASP.NET Apps Faster
10 tips to make your ASP.NET Apps Faster10 tips to make your ASP.NET Apps Faster
10 tips to make your ASP.NET Apps Faster
Brij Mishra
 
Php iis microsoft
Php iis microsoftPhp iis microsoft
Php iis microsoft
Nick Hodge
 
Programming Server side with Sevlet
 Programming Server side with Sevlet  Programming Server side with Sevlet
Programming Server side with Sevlet
backdoor
 
Harish Understanding Aspnet
Harish Understanding AspnetHarish Understanding Aspnet
Harish Understanding Aspnet
rsnarayanan
 
IIS 7: The Administrator’s Guide
IIS 7: The Administrator’s GuideIIS 7: The Administrator’s Guide
IIS 7: The Administrator’s Guide
Information Technology
 
Usability AJAX and other ASP.NET Features
Usability AJAX and other ASP.NET FeaturesUsability AJAX and other ASP.NET Features
Usability AJAX and other ASP.NET Features
Peter Gfader
 
PHP conference Berlin 2015: running PHP on Nginx
PHP conference Berlin 2015: running PHP on NginxPHP conference Berlin 2015: running PHP on Nginx
PHP conference Berlin 2015: running PHP on Nginx
Harald Zeitlhofer
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescue
Marko Heijnen
 
Asp dot net long
Asp dot net longAsp dot net long
Asp dot net long
Amelina Ahmeti
 
Joomla! Performance on Steroids
Joomla! Performance on SteroidsJoomla! Performance on Steroids
Joomla! Performance on Steroids
SiteGround.com
 
Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM i
Zend by Rogue Wave Software
 
Microsoft, PHP and IIS7
Microsoft, PHP and IIS7Microsoft, PHP and IIS7
Microsoft, PHP and IIS7
Nick Hodge
 
PHP and FastCGI Performance Optimizations
PHP and FastCGI Performance OptimizationsPHP and FastCGI Performance Optimizations
PHP and FastCGI Performance Optimizations
Alessandro Pilotti
 
Php Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc JaoPhp Asp Net Interoperability Rc Jao
Php Asp Net Interoperability Rc Jao
jedt
 
ASP.NET 4.0
ASP.NET 4.0ASP.NET 4.0
ASP.NET 4.0
XeDotNet
 
SharePoint 2010 Boost your farm performance!
SharePoint 2010 Boost your farm performance!SharePoint 2010 Boost your farm performance!
SharePoint 2010 Boost your farm performance!
Brian Culver
 
CTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should KnowCTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should Know
Spiffy
 
Web Front End Performance
Web Front End PerformanceWeb Front End Performance
Web Front End Performance
Chris Love
 
10 tips to make your ASP.NET Apps Faster
10 tips to make your ASP.NET Apps Faster10 tips to make your ASP.NET Apps Faster
10 tips to make your ASP.NET Apps Faster
Brij Mishra
 
Php iis microsoft
Php iis microsoftPhp iis microsoft
Php iis microsoft
Nick Hodge
 
Programming Server side with Sevlet
 Programming Server side with Sevlet  Programming Server side with Sevlet
Programming Server side with Sevlet
backdoor
 
Harish Understanding Aspnet
Harish Understanding AspnetHarish Understanding Aspnet
Harish Understanding Aspnet
rsnarayanan
 
Usability AJAX and other ASP.NET Features
Usability AJAX and other ASP.NET FeaturesUsability AJAX and other ASP.NET Features
Usability AJAX and other ASP.NET Features
Peter Gfader
 
PHP conference Berlin 2015: running PHP on Nginx
PHP conference Berlin 2015: running PHP on NginxPHP conference Berlin 2015: running PHP on Nginx
PHP conference Berlin 2015: running PHP on Nginx
Harald Zeitlhofer
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescue
Marko Heijnen
 
Joomla! Performance on Steroids
Joomla! Performance on SteroidsJoomla! Performance on Steroids
Joomla! Performance on Steroids
SiteGround.com
 
Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM i
Zend by Rogue Wave Software
 
Ad

Recently uploaded (20)

Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
Slack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teamsSlack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teams
Nacho Cougil
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...
BookNet Canada
 
Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptxWebinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
MSP360
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
BookNet Canada
 
Config 2025 presentation recap covering both days
Config 2025 presentation recap covering both daysConfig 2025 presentation recap covering both days
Config 2025 presentation recap covering both days
TrishAntoni1
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)
Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)
Com fer un pla de gestió de dades amb l'eiNa DMP (en anglès)
CSUC - Consorci de Serveis Universitaris de Catalunya
 
The Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdfThe Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdf
Precisely
 
Does Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should KnowDoes Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should Know
Pornify CC
 
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptxSmart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Seasia Infotech
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
Slack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teamsSlack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teams
Nacho Cougil
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...Transcript: Canadian book publishing: Insights from the latest salary survey ...
Transcript: Canadian book publishing: Insights from the latest salary survey ...
BookNet Canada
 
Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptxWebinar - Top 5 Backup Mistakes MSPs and Businesses Make   .pptx
Webinar - Top 5 Backup Mistakes MSPs and Businesses Make .pptx
MSP360
 
UiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer OpportunitiesUiPath Agentic Automation: Community Developer Opportunities
UiPath Agentic Automation: Community Developer Opportunities
DianaGray10
 
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
BookNet Canada
 
Config 2025 presentation recap covering both days
Config 2025 presentation recap covering both daysConfig 2025 presentation recap covering both days
Config 2025 presentation recap covering both days
TrishAntoni1
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
RTP Over QUIC: An Interesting Opportunity Or Wasted Time?
Lorenzo Miniero
 
The Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdfThe Changing Compliance Landscape in 2025.pdf
The Changing Compliance Landscape in 2025.pdf
Precisely
 
Does Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should KnowDoes Pornify Allow NSFW? Everything You Should Know
Does Pornify Allow NSFW? Everything You Should Know
Pornify CC
 
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptxSmart Investments Leveraging Agentic AI for Real Estate Success.pptx
Smart Investments Leveraging Agentic AI for Real Estate Success.pptx
Seasia Infotech
 

PHP on Windows 2008

  • 1.  
  • 2. Jorke Odolphi Microsoft Australia web platform architect evangelist [email_address] @jorke
  • 4. So Bacon has feathers now? Contributing to Open Source Open Specification Promise Apache Software Foundation
  • 5. IIS Request Processing Server functionality is split into ~ 40 modules... Modules plug into a generic request pipeline… Modules extend server functionality through a public module API. Authorization ResolveCache UpdateCache … … … Monolithic implementation Install all or nothing … Extend server functionality only through ISAPI … Send Response Log Compress NTLM Basic Determine Handler CGI Static File ISAPI Authentication Anon SendResponse Authentication ExecuteHandler ASP.NET PHP
  • 6. IIS 6.0 ASP.NET Processing Runtime limitations Only sees ASP.NET requests Feature duplication … … … … aspnet_isapi.dll Send Response Log Compress NTLM Basic Determine Handler CGI Static File ISAPI Authentication Anon Authentication Forms Windows Map Handler ASPX Trace …
  • 7. IIS6 Application Framework support Common Gateway Interface (CGI) for CGI and PHP applications Benefits Very simple to implement and use – single-threaded execution Disadvantages Poor performance due to high process creation cost Creates and passes request data to a new CGI process Waits for CGI process to produce response Shuts down CGI process
  • 8. IIS6 Application Framework support Internet Server Application Programming Interface (ISAPI) Benefit of ISAPI Can be extremely fast when written correctly Disadvantage of ISAPI Must be thread-safe (many PHP extensions are not!) Requires development in C++
  • 9. IIS 7.0 ASP.NET Request Processing Classic Mode runs as ISAPI Integrated Mode .NET modules / handlers plug directly into pipeline Process all requests Full runtime fidelity Authorization ResolveCache UpdateCache … … … … aspnet_isapi.dll Log Compress Basic Static File ISAPI Anon SendResponse Authentication ExecuteHandler Authentication Forms Windows Map Handler ASPX Trace …
  • 10. New Configuration NET global settings .NET Framework Global web.config machine.config IIS 7 applicationHost.config Site Root web.config <system.web> .NET settings .. <system.webServer> IIS 7 Delegated settings ASP.NET global settings Global settings and location tags
  • 12. Per-site PHP configuration Configuring FastCGI process pool < fastCgi > < application fullPath =&quot;C:\PHP\php-cgi.exe&quot; arguments =&quot;-d my.website=website1&quot;> < environmentVariables > < environmentVariable name =&quot;PHPRC&quot; value =&quot;C:\WebSites\website1&quot; /> </ environmentVariables > </ application > </ fastCgi > Combination of fullPath and arguments uniquely identify FastCGI process pool definition PHPRC environment variable contains path to the php.ini file
  • 13. Per-site PHP configuration Configuring Handler Mapping < system.webServer > < handlers accessPolicy =&quot;Read, Script&quot;> < add name =&quot;PHP via FastCGI&quot; path =&quot;*.php&quot; verb =&quot;*&quot; modules =&quot;FastCgiModule&quot; scriptProcessor =&quot;C:\PHP\php-cgi.exe|-d my.website=website2&quot; resourceType =&quot;Unspecified&quot; requireAccess =&quot;Script&quot; /> </ handlers > </ system.webServer > Reference FastCGI process pool by concatenating [fullPath]|[arguments]
  • 14. PHP Setup Feature Delegation Remote Administration Web Server Core Integration
  • 15. Thread safe Non Thread Safe
  • 16. PHP with FastCGI Zend Collaboration Built in Support for Fast CGI Re-use of processes BIG performance boost Thread Safe vs Non Thread Safe Thread Safe Non-Thread Safe
  • 17. FastCGI Handler Architecture IIS Worker Process Request queue FastCGI process pool for PHP5 php-cgi.exe FastCGI process pool for PHP4 php.exe FastCGI protocol over named pipes or TCP
  • 18. Best Practices for Running PHP on IIS7 Want to set PHP specific environment variables in the web.config file? Use environmentVariables configuration setting to set PHP specific environment variables. <fastCgi> <application fullPath=&quot;C:\PHP\php-cgi.exe&quot; instanceMaxRequests=“10000&quot;> <environmentVariables>     <environmentVariable name=”PHP_FCGI_MAX_REQUESTS” value=”10000”/>     </environmentVariables> </application> </fastCgi>
  • 19. Best Practices for Running PHP on IIS7 Is your server under so much load that your clients are getting timeout responses? The FastCGI process will be terminated if it does not respond to FastCGI handler within specified time period. Set the requestTimeout (number of seconds to wait for process to handle the request) value to be higher than the activityTimeout (number of seconds to wait for any process activity) value. <fastCgi> <application fullPath=&quot;C:\PHP\php-cgi.exe&quot; activityTimeout=“30&quot; requestTimeout=“90&quot;/> </fastCgi>
  • 20. Manage CPU utilization Windows Server Resource Manager (WSRM) Available in all SKU’s of WS2008 Ensures that process gets *at least* the configured CPU percentage Kicks in only if overall CPU load is more than 70% IIS team tested WSRM with 4000 web sites
  • 22. Performance Best Practices Enable Output Caching for semi-dynamic pages Low bandwidth Branch Offices? Enable Dynamic Compression ( ~ 5% CPU overhead) Need to run many web apps on a single box? Run IIS worker processes in Wow64 mode Room for the OS, scalability for your web apps It’s an per-AppPool setting now: Enable32BitAppOnWow64 Thinking about buying new Web Server hardware? W2K8 scales extremely well on new multi-proc boxes (4 and 8 core) ASP.NET op caching vs. IIS op caching vs. KM output caching
  • 23. Performance Best Practices 1000s of requests per second? Remove modules you don’t need You don’t know why some pages are so slow? Turn on Failed Request Tracing and the “time-taken” feature to investigate You * script-mapped all requests to ASP.NET in IIS6? Integrated Pipeline is much faster than an IIS6 * scriptmap solution Try together with IIS7 URL Authorization.
  • 24. Performance Best Practices PHP applications? PHP on top of FastCGI is much faster than traditional CGI The majority of your requests go to your Default Document? Put it on top of the list Otherwise IIS7 has to check every time Static default documents will be cached in kernel-mode Looking for tools to measures web server performance? Try WCAT 6.3 from www.iis.net/downloads
  • 25. Performance Boosting Better compression for static and dynamic Output caching a module Per URL / query string / request headers Huge improvements to allow for high density or high availability
  • 26. IIS Extensions Mod_rewrite support for URL rewriting
  • 28. SID Injection AppPool: newPool username: newPoolUser password: <password> LogonUser AccessCheck AccessCheck Service Host (SVCHost.EXE) Windows Process Activation Service (WAS) World Wide Web Service (W3SVC) applicationhost.config Token Token NewPool\ Wwwroot\ default.htm ACL OK Otherpool\ Wwwroot\ default.htm ACL Denied
  翻译: