/Web
Rev it up with PHP and IIS
Josh Holmes
Architect Evangelist
Microsoft Corporation
josh.holmes@microsoft.com
@joshholmes
Mark Brown
Web Platform Team
Microsoft Corporation
mark.brown@microsoft.com
@markjbrown
First, a little history…
• PHP on Win/IIS == Big Joke2006
• FastCGI2007
• IIS URL Rewrite & IIS 7
• SQL Driver for PHP2008
• WinCache 1.0
• PHP 5.32009
• WinCache 1.1
• PHP Manager2010
IIS 7
• Default minimum
installation
• New modular architecture
• Streamlined processing
pipeline
• Config similar to .htaccess,
web.config faster
Authorization
Resolve Cache
Execute Handler
Update Cache
Authentication
Send Response
FAST-CGI PHP
• Production PHP on Windows/IIS !!!!
• Handles requests from app pool
– No more createproc() per request
• Automatic Performance tuning
– Mem, CPU, CTX
– Better density for hosted environments
• Auto recycling PHP pool when php.ini changes
– No more manual IIS restarts
• Consistent features across all versions of IIS
– Code in XP, deploy to WinSvrR2
WINCACHE
• Boost your speed with no code
changes
– Opcode Cache
– File Cache
– Relative File Path Cache
– Session Cache
– User Data Cache
• WinCache Statistics Script for
performance details
URL REWRITE
• Required for many Web CMS’s
• Rules-based, text file or database
• Reg-Ex & wildcard matching
• Rewrite:
– Outbound URL’s
– Request headers and Server variables
– HTTP Response
– Inside specific html tags in response
• Import Apache mod_rewrite
PHP 5.3
• Updated code base
• Native Win32 instead of POSIX
• Latest compiler VC9
• Use Non-Thread-Safe builds for
better performance.
PHP Manager
• Register multiple PHP versions
with IIS
• Easy checking of phpinfo()
• Configure PHP error reporting
• Manage all php.ini directives
and PHP extensions within IIS
• Remote PHP administration via
IIS Remote Administration Tool
http://phpmanager.codeplex.com/
SQL Server
• PHP Driver for SQL Server 2.0
• Support for native PHP
• Support for PDO
• Support for PHP 5.3
• Source released under Apache 2.0
• Signed version includes support
• Drupal 7 will be first major PHP app with SQL
Server support
IIS DATABASE MANAGER
• Consolidate MySQL or SQL
Server Management inside IIS
where you manage your sites
– Manage local/remote databases
– Create and edit tables
– Add and edit data
– Modify indexes and keys
– Create and execute queries
PHP Web Apps
• Web Application Gallery
– The most popular PHP apps
– Easiest way to install
– Packages built and tested for
Windows/IIS
– Promoting actively:
•http://web.ms/wordpress
•http://web.ms/drupal
•http://web.ms/joomla
PHP INTEROPERABILITY
• Extend PHP Applications:
– Build reports with SQL
Server Reporting Services
and the SDK for PHP
– Jazz up PHP app with
Silverlight adaptive
streaming
– Add Bing Search to your
site, like the WordPress
plug-in
http://www.interoperabilitybridges.com/php
PHP + COMMUNITY
• WinCache is on PECL
• SQL Server Driver for PHP is on codeplex
• IIS and WinCache documentation on php.net
• Participating on PHP forums
• Working with PHP Group to improve PHP and PHP
installer
• Working with PHP application developers to
integrate URLRewrite and WinCache
• Working with PHP application communities to
enable easier deployment on Windows/IIS (Web
Deploy)
START RIGHT HERE
PHP on Windows
microsoft.com/web/php
SUMMARY
• Windows & IIS is now
viable for production PHP
application hosting
• PHP performance on
Windows has significantly
improved in last 2 years.
• Web App Gallery will grow
PHP developers on
Windows and grow your
business.
Questions?
© 2010 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.

More Related Content

PPT
Wordpress On Windows
PPTX
Scaling WordPress on Microsoft
PPTX
Wordpress on Windows
PPTX
Microsoft/Zend Webcast on Cloud Computing
PDF
Php Performance On Windows
PPTX
PHP Enhancement with Windows Server 2008
PDF
Drupal Day 2011 - Webmatrix loves Drupal!
PPTX
PHP and FastCGI Performance Optimizations
Wordpress On Windows
Scaling WordPress on Microsoft
Wordpress on Windows
Microsoft/Zend Webcast on Cloud Computing
Php Performance On Windows
PHP Enhancement with Windows Server 2008
Drupal Day 2011 - Webmatrix loves Drupal!
PHP and FastCGI Performance Optimizations

What's hot (20)

PDF
How to install and configure microsoft iis 7.5, php, my sql, and phpmyadmin
PPTX
Webplatform And Php
PDF
Chapter 1
PPTX
IIS PPT (1)
PPTX
introduction and configuration of IIS (in addition with printer)
PPTX
Hosting a website on IIS Server
PDF
My sql università di enna a.a. 2005-06
PDF
Locking Down CF Servers
PPT
Application Syndication Whitepaper
PPTX
Php hypertext Preprocessor
PPT
Open Mic IBM connections and IBM Verse on premise integration
ODP
Browser Exploitation Framework Tutorial
PDF
It’s a WIN, WIN: ‘WordPress On Windows’
PPTX
WordPress Multilingual: WordCamp Antwerp 2016
PDF
Php introduction
PPTX
Welcome to the World of WordPress
PPT
Lamp
PDF
Open Mic - IBM Sametime Proxy Clustering
PDF
Perforce CMS
PPT
How to install and configure microsoft iis 7.5, php, my sql, and phpmyadmin
Webplatform And Php
Chapter 1
IIS PPT (1)
introduction and configuration of IIS (in addition with printer)
Hosting a website on IIS Server
My sql università di enna a.a. 2005-06
Locking Down CF Servers
Application Syndication Whitepaper
Php hypertext Preprocessor
Open Mic IBM connections and IBM Verse on premise integration
Browser Exploitation Framework Tutorial
It’s a WIN, WIN: ‘WordPress On Windows’
WordPress Multilingual: WordCamp Antwerp 2016
Php introduction
Welcome to the World of WordPress
Lamp
Open Mic - IBM Sametime Proxy Clustering
Perforce CMS

Similar to Rev it up with php on windows (20)

PPT
PHP on Windows - What's New
PDF
Windows Loves Drupal
PDF
Php apache vs iis By Hafedh Yahmadi
PPTX
Php On Windows
PPTX
PHP on Windows
PPTX
PHP on Windows
PPTX
Windows Loves drupal
PPTX
PHP konferencija - Microsoft
PPTX
Microsoft WebsiteSpark & Windows Platform Installer
PPT
Php Presentation
PDF
Integrating PHP With System-i using Web Services
PPTX
Microsoft+PHP: Make Web Not War
PDF
ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5
PPTX
PHP on Windows and on Azure
PPT
Running PHP on Windows Technical Overview
PPTX
Developing Php Applications Using Microsoft Software And Services
DOCX
Comparing IIS and Apache - Questions and Answers
PPTX
Partying with PHP on Microsoft Internet Information Services 7
PPTX
Publish_PHP_Website_Windows_Server_2012.pptx
PPTX
Windows Server and Fast CGI Technologies For PHP
PHP on Windows - What's New
Windows Loves Drupal
Php apache vs iis By Hafedh Yahmadi
Php On Windows
PHP on Windows
PHP on Windows
Windows Loves drupal
PHP konferencija - Microsoft
Microsoft WebsiteSpark & Windows Platform Installer
Php Presentation
Integrating PHP With System-i using Web Services
Microsoft+PHP: Make Web Not War
ITCamp 2011 - Alessandro Pilotti - Optimizing ASPNet and PHP apps on IIS 7.5
PHP on Windows and on Azure
Running PHP on Windows Technical Overview
Developing Php Applications Using Microsoft Software And Services
Comparing IIS and Apache - Questions and Answers
Partying with PHP on Microsoft Internet Information Services 7
Publish_PHP_Website_Windows_Server_2012.pptx
Windows Server and Fast CGI Technologies For PHP

More from Josh Holmes (20)

PPTX
Mentorship by Josh Holmes - a KalamazooX talk
PPTX
Tips from a grizzled speaker
PPTX
BrazilJS Perf Doctor Talk
PPTX
Touch me, I Dare You...
PPTX
Cloud becomingreality
PPTX
F as in failure slideshare
PPTX
Is that a Rich Web in Your Pocket?
PPTX
Cloud by Numbers
PPTX
So you want to be an architect
PPTX
Microsoft Zend webcast on Azure
PPTX
Microsoft and PHP at CakeFest 2010
PPTX
MODx on Windows
PPTX
Scaling Big While Sleeping Well
PPTX
Moving Enterprise Applications To The Cloud
PPT
Best And Worst Practices Building Ria with Adobe and Microsoft
PPTX
The Lost Art of Simplicity
PPT
Architecture of RIA from JAOO
PPT
Architecting RIAs with Silverlight
PPT
Best And Worst Ria
PPT
32 Ways To Keep Your Blog From Sucking
Mentorship by Josh Holmes - a KalamazooX talk
Tips from a grizzled speaker
BrazilJS Perf Doctor Talk
Touch me, I Dare You...
Cloud becomingreality
F as in failure slideshare
Is that a Rich Web in Your Pocket?
Cloud by Numbers
So you want to be an architect
Microsoft Zend webcast on Azure
Microsoft and PHP at CakeFest 2010
MODx on Windows
Scaling Big While Sleeping Well
Moving Enterprise Applications To The Cloud
Best And Worst Practices Building Ria with Adobe and Microsoft
The Lost Art of Simplicity
Architecture of RIA from JAOO
Architecting RIAs with Silverlight
Best And Worst Ria
32 Ways To Keep Your Blog From Sucking

Recently uploaded (20)

PDF
Connector Corner: Transform Unstructured Documents with Agentic Automation
PDF
CEH Module 2 Footprinting CEH V13, concepts
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PDF
Rapid Prototyping: A lecture on prototyping techniques for interface design
PDF
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
PPTX
How to Convert Tickets Into Sales Opportunity in Odoo 18
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PDF
ment.tech-Siri Delay Opens AI Startup Opportunity in 2025.pdf
PPTX
Presentation - Principles of Instructional Design.pptx
PDF
CCUS-as-the-Missing-Link-to-Net-Zero_AksCurious.pdf
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PDF
Decision Optimization - From Theory to Practice
PDF
substrate PowerPoint Presentation basic one
PDF
Examining Bias in AI Generated News Content.pdf
PDF
A symptom-driven medical diagnosis support model based on machine learning te...
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PDF
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PDF
Build Real-Time ML Apps with Python, Feast & NoSQL
PDF
Streamline Vulnerability Management From Minimal Images to SBOMs
Connector Corner: Transform Unstructured Documents with Agentic Automation
CEH Module 2 Footprinting CEH V13, concepts
giants, standing on the shoulders of - by Daniel Stenberg
Rapid Prototyping: A lecture on prototyping techniques for interface design
zbrain.ai-Scope Key Metrics Configuration and Best Practices.pdf
How to Convert Tickets Into Sales Opportunity in Odoo 18
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
ment.tech-Siri Delay Opens AI Startup Opportunity in 2025.pdf
Presentation - Principles of Instructional Design.pptx
CCUS-as-the-Missing-Link-to-Net-Zero_AksCurious.pdf
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
Decision Optimization - From Theory to Practice
substrate PowerPoint Presentation basic one
Examining Bias in AI Generated News Content.pdf
A symptom-driven medical diagnosis support model based on machine learning te...
Lung cancer patients survival prediction using outlier detection and optimize...
A hybrid framework for wild animal classification using fine-tuned DenseNet12...
NewMind AI Weekly Chronicles – August ’25 Week IV
Build Real-Time ML Apps with Python, Feast & NoSQL
Streamline Vulnerability Management From Minimal Images to SBOMs

Rev it up with php on windows

  • 1. /Web Rev it up with PHP and IIS Josh Holmes Architect Evangelist Microsoft Corporation [email protected] @joshholmes Mark Brown Web Platform Team Microsoft Corporation [email protected] @markjbrown
  • 2. First, a little history… • PHP on Win/IIS == Big Joke2006 • FastCGI2007 • IIS URL Rewrite & IIS 7 • SQL Driver for PHP2008 • WinCache 1.0 • PHP 5.32009 • WinCache 1.1 • PHP Manager2010
  • 3. IIS 7 • Default minimum installation • New modular architecture • Streamlined processing pipeline • Config similar to .htaccess, web.config faster Authorization Resolve Cache Execute Handler Update Cache Authentication Send Response
  • 4. FAST-CGI PHP • Production PHP on Windows/IIS !!!! • Handles requests from app pool – No more createproc() per request • Automatic Performance tuning – Mem, CPU, CTX – Better density for hosted environments • Auto recycling PHP pool when php.ini changes – No more manual IIS restarts • Consistent features across all versions of IIS – Code in XP, deploy to WinSvrR2
  • 5. WINCACHE • Boost your speed with no code changes – Opcode Cache – File Cache – Relative File Path Cache – Session Cache – User Data Cache • WinCache Statistics Script for performance details
  • 6. URL REWRITE • Required for many Web CMS’s • Rules-based, text file or database • Reg-Ex & wildcard matching • Rewrite: – Outbound URL’s – Request headers and Server variables – HTTP Response – Inside specific html tags in response • Import Apache mod_rewrite
  • 7. PHP 5.3 • Updated code base • Native Win32 instead of POSIX • Latest compiler VC9 • Use Non-Thread-Safe builds for better performance.
  • 8. PHP Manager • Register multiple PHP versions with IIS • Easy checking of phpinfo() • Configure PHP error reporting • Manage all php.ini directives and PHP extensions within IIS • Remote PHP administration via IIS Remote Administration Tool http://phpmanager.codeplex.com/
  • 9. SQL Server • PHP Driver for SQL Server 2.0 • Support for native PHP • Support for PDO • Support for PHP 5.3 • Source released under Apache 2.0 • Signed version includes support • Drupal 7 will be first major PHP app with SQL Server support
  • 10. IIS DATABASE MANAGER • Consolidate MySQL or SQL Server Management inside IIS where you manage your sites – Manage local/remote databases – Create and edit tables – Add and edit data – Modify indexes and keys – Create and execute queries
  • 11. PHP Web Apps • Web Application Gallery – The most popular PHP apps – Easiest way to install – Packages built and tested for Windows/IIS – Promoting actively: •http://web.ms/wordpress •http://web.ms/drupal •http://web.ms/joomla
  • 12. PHP INTEROPERABILITY • Extend PHP Applications: – Build reports with SQL Server Reporting Services and the SDK for PHP – Jazz up PHP app with Silverlight adaptive streaming – Add Bing Search to your site, like the WordPress plug-in http://www.interoperabilitybridges.com/php
  • 13. PHP + COMMUNITY • WinCache is on PECL • SQL Server Driver for PHP is on codeplex • IIS and WinCache documentation on php.net • Participating on PHP forums • Working with PHP Group to improve PHP and PHP installer • Working with PHP application developers to integrate URLRewrite and WinCache • Working with PHP application communities to enable easier deployment on Windows/IIS (Web Deploy)
  • 14. START RIGHT HERE PHP on Windows microsoft.com/web/php
  • 15. SUMMARY • Windows & IIS is now viable for production PHP application hosting • PHP performance on Windows has significantly improved in last 2 years. • Web App Gallery will grow PHP developers on Windows and grow your business.
  • 17. © 2010 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.

Editor's Notes

  • #3: So the prevailing notion among many in the web is that running PHP on Windows is largely a joke. For many years the ability to run PHP on Windows meant two options: Run PHP using CGI, which for many was stable but really slow. Or run PHP using the ISAPI module which was faster, but incredibly unstable. Other things were missing as well including a good option for clean URL’s and caching So beginning in 2007 Microsoft set about to change that and for roughly the last 4 years we have been making some huge changes and improvements to both our web platform in Windows Server and IIS as well as working with the PHP Group itself to make PHP better on Windows as well as provide URL rewriting capabilities and caching as well. Today I am going to talk to you about each of the things we’ve been doing and talking to you about how they have made PHP on Windows not just possible but for many of you, actually a smart and pragmatic approach to your hosted offerings.
  • #4: IIS IIS 7.0 is a from the ground up rewrite over the previous versions and with a new architecture. Default Min Install: The new IIS 7.0 architecture and default minimum install enables a significant reduction in attack surface making it far more secure. Modular Architecture: Previous versions of IIS were difficult to customize or streamline for high performance applications. This new modular architecture makes it far easier to create modules and handlers at any point in the processing pipeline. You also don’t have to write these modules in C++ anymore either. You can create them in managed code far faster and with excellent performance. Streamlined Processing Pipeline: The modular architecture allows for a streamlined processing pipeline. Load only what modules you need for much better performance. Web Config: The new configuration system in IIS 7.0 loads configuration files—similar to .htaccess files in Apache—and manages them in a cache after first read. All subsequent requests use the cached configuration and the new configuration cache consumes significantly less memory than the equivalent in Apache. IIS 7.0 also includes caching support for all types of dyn amic content.
  • #5: Fast CGI With the release of FastCGI first time you could actually consider hosting php on win/iis, production quality, no more crashes. Previously you had two options to host PHP, CGI or PHP ISAPI. CGI was stable but very slow because you had to spin up a new process for each new PHP request. ISAPI was faster but since many popular extensions for PHP were not thread safe this caused major issues with stability. FastCGI handles PHP requests out of an app pool rather than spinning up a new one each time. FastCGI provides optimal PHP performance without having to manually tune: Fast CGI provides Automatic performance tuning. Determines: CPU usage, memory consumption, context switches. Based upon that information it changes the number of PHP processes to optimize your application automatically. (Sets Dynamic Max Instances) Very important if you are a hoster managing many customers since it allows for a higher density of PHP applications on Windows than you could get before or a customer with an app that has large changes in requests over time. Automatic recycling of PHP processes in IIS when php.ini changes. No longer need to restart IIS. Version 1.5 now has a consistent set of features across all versions of IIS. This is important as a significant number of PHP developers still use XP. This will allow them to develop and deploy seamlessly to Windows Server. Version 1.5 of Fast-CGI is included in Windows Server 2008 R2 (IIS 7.5), an update is available for IIS 7 along with a back-port for those using XP. Another useful feature I wanted to point out here as well is you can provide to your customers developing or running PHP on Windows/IIS is the Advanced Logging module in IIS which you can use to consolidate event reporting for PHP itself as well as from IIS. This will help your customers consolidate application performance reporting, good for tracking failed requests or other issues in your php application. No need to have separate error log files for webserver and php.
  • #6: Compile and file operations on Windows are slower than on linux. Many more security checks, etc. Many PHP developers on Linux use other caching mechanisms such as memcache or APC. There are no good open source solutions for caching on Windows WinCache is our solution to help provide even more performance for PHP on Windows. Opcode cache – this is a cache of the compiled PHP file. WinCache let PHP core compile the PHP file to generate opcodes first time it is executed. Then caches these opcodes in memory and is shared with other PHP processes Increasing performance, especially on subsequent access to the executable code. Can expect a 100%-200% increase in performance. File cache – File IO operations on Windows are much more expensive than on Linux. For files on UNC’s or NFS in hosting environments scenarios it is even worse. File Cache stores the contents of opened files in shared memory. This increases performance 80-90% over accessing the files each time from a shared location. Resolve File Path cache – On first access a PHP application will work to determine the absolute path to a file to then open it This feature is used to store the absolute path from relative file paths used in PHP applications. Again, anything to reduce usage of the file systems calls produces performance gains. Session Cache: The session cache will take and store session data in shared memory cache instead of file system for added performance benefits. Currently this feature cannot be used in a webfarm where there is no session affinity. User Data Cache API’s: Provides caching functions(API’s) with the Can be used by PHP applications for storing variables and objects in shared memory using WinCache instead of PHPs cache. You can cache database data, php data, classes, etc. Overall just closing the feature gap to APC, etc. trying to have a complete solution. WinCache Statistics Script – This thing is very cool and you should check it out. Great for helping you benchmark and fine tune your PHP applications on Windows. Is installed with the WinCache for PHP. PS: this file is protected by default with HTTP basic authentication so if you do provide this for your customers. Just an FYI.
  • #8: So prior to PHP 5.3 the PHP engine itself wasn’t mature on Windows, causing compatibility and performance problems. Implemented with APR (Apache portable runtime) instead of directly on Win32 created subpar performance Also many Windows-specific PHP bugs hadn’t been fixed There were as I mentioned earlier issues with hosting on IIS itself with the slow CGI or unstable ISAPI handler. Using FastCGI provided the fix for that part. The next piece was… PHP 5.3 Has an updated code base Much of PHP for Windows completely rewritten to use native Win32 instead of through the POSIX layer Also compiled using our latest compiler VC9 versus VC 6 which was 10 years old Use the NTS version. No thread safety checks since PHP runs Single threaded on IIS in FastCGI. Reason for NTS is that many of the most popular community extensions themselves are NTS themselves, making NTS the default on Windows is the safest route for stability. Btw, Anybody know who this guy Rasmus guy is? PS: The Web App Gallery is still using 5.2.x (app requirement) but we are getting close to having multiple versions of PHP available for
  • #9: PHP Manager for IIS 7 is a open source extension for IIS Management Console, that greatly simplifies the tasks of setting up, configuring and managing one or more PHP versions on IIS server. Use it to register PHP with IIS, run multiple PHP versions, get the information about PHP runtime settings, add and modify php.ini directives and enable or disable PHP extensions. Features: Simple registration of many PHP versions with IIS An easy way of checking if PHP works correctly by geting the output of phpinfo() function Configuring the PHP error reproting settings for production or development environment Managing all php.ini directives and PHP extensions from within IIS manager Remote PHP administration via IIS Remote Administration Tool Works well with PHP installed via Web Platform Installer or PHP Windows Installer http://phpmanager.codeplex.com/releases/view/53121