Download - Php apache vs iis By Hafedh Yahmadi
![Page 1: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/1.jpg)
palais des congrès Tunis
8 et 9 février 2012
![Page 2: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/2.jpg)
PHP / APACHE & MICROSOFT
Yahmadi Hafedh – DPE Microsoft Tunisie
![Page 3: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/3.jpg)
Agenda
1. PHP for Windows Qu’est ce que PHP ? Que peut Faire PHP ? Windows IIS avec PHP. Demo
2. Web Server (IIS & Apache) 3. IIS features in details 4. Case Study + demo 5. PHP on the Cloud 6. Conclusion
![Page 4: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/4.jpg)
Titre 1
Introduction
PHP For Windows 1
![Page 5: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/5.jpg)
What is PHP? PHP stands for "PHP
Hypertext Preprocessor” An embedded scripting
language for HTML like ASP or JSP
A language that combines elements of Perl, C, and Java
History of PHP Created by Rasmus Lerdorf in
1995 for tracking access to his resume
Originally a set of Perl scripts known as the “Personal Home Page” tools
Rewritten in C with database functionality
Qu’est ce que PHP?
![Page 6: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/6.jpg)
PHP is used by 77.2% of all the websites whose server-side programming language we know.
PHP 77.2% ASP.NET 21.7% Java 4.1% ColdFusion 1.2% Perl 1.0% Ruby 0.6% Python 0.3%
W3Techs.com, 6 Dec 2011
This Table shows the percentages of websites using various versions of PHP.
Version 5 94%
Version 4 06%
Version 3 Less than 0.1%
Version 6 Less than 0.1%
W3Techs.com, 6 Dec 2011
![Page 7: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/7.jpg)
The Script Tags All PHP code is contained in
one of several script tags: <?
// Some code ?>
<?php // Some code here ?>
The Script Tags (cont.) <script language=“PHP">
// Some code here </script>
ASP-style tags Introduced in 3.0; <% // Some code here %>
PHP Language Basics
![Page 8: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/8.jpg)
1. Sites Web et applications Web (script côté serveur)
2. Scripts en ligne de commande
3. Ecrire Applications à interface graphique (GUI)
C'est l'utilisation la plus traditionnelle. Ecrire des scripts PHP et l'exécuter en ligne de commande (Cron) PHP-GTK
Que peut Faire PHP ?
![Page 9: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/9.jpg)
Code Portability The obvious: don’t use Unix or
Windows specific functions Create a reusable module for file
system differences, for example: • if( PHP_OS == "Linux" )
{ $ConfigPath = "/var/www/conf"; $DataPath = "/var/www/data"; }
Code Portability if( ereg("WIN", PHP_OS) )
{ $ApachePath = “C:/Program Files/Apache Group/Apache”; $ConfigPath = ”$ApachePath/htdocs/conf"; $DataPath = "$ApachePath/htdocs/data"; }
PHP on Linux and Windows (Portability OS, WebServer, OOP, Protocol, BD)
![Page 10: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/10.jpg)
DEMO
Donwload PHPonWindows&SQLServerTrainingKit
from http://www.microsoft.com/download/en/details.aspx?id=8887
PHP Installer from : http://Windows.php.net
![Page 11: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/11.jpg)
Titre 1
PHP For Windows
Web Server (IIS & Apache) 2 Durant des decencies Apache Foundation et Microsoft dominent les servers web shares
![Page 12: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/12.jpg)
IIS 3.0 in option in Windows NT 4.0 IIS 5.0 was included in Windows 2000 in both server and Desktop IIS 5.1 part of XP Windows Server 2003 includes the new IIS 6.0 Windows Server 2008 (R2) includes IIS7.5
Internet Information Server
![Page 13: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/13.jpg)
Free web server. Often combined with Linux, MySQL, and PHP to make the LAMP stack. First released in 1995. Modular architecture. Built using an open source development model. Commercial friendly open-source license. Current stable Version is 2.2.22 which was released in 31 January 2012
APACHE Overview
![Page 14: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/14.jpg)
Proven Scalability and Stability Used by many major sites
and companies such as MySpace.com, Match.com, US Bank, USA Today, Allstate, Continental Airlines and others.
Significant increase in reliability of hosted web sites compared to IIS 5.0.
A solid trusted foundation for IIS 7.0
IIS 6.0 – A Solid Foundation Shipped with Windows
Server 2003 Proven Security
Significant reduction in attack surface compared to previous releases
IIS 6 Overview
![Page 15: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/15.jpg)
IIS7 Overview Benefits Features
Modular and Extensible Integrated with .NET Improved Security Agile Administration Built in Request
Tracing
Reduced Attack Surface
Easier to Manage Fast Diagnostics
Extend/Modify IIS Features
Create Streamlined
Servers
IIS 7 Overview
![Page 16: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/16.jpg)
Titre 1
PHP For Windows
IIS Features in details 3
![Page 17: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/17.jpg)
Questions “Which of the two platforms (IIS and Apache)
is more secure?”
“Which is easier to manage?”
“Is Apache or IIS easier to manage?”
“Which web server is more reliable?”
“Which is more modular, IIS or Apache?”
“Is IIS or Apache more innovative?”
“Is IIS or Apache easier to troubleshoot?”
“Does Apache support more applications?”
“Does IIS or Apache have the lower TCO?”
“Is Apache the best platform for PHP Applications?”
![Page 18: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/18.jpg)
IIS / Security Development Lifecycle Automatic Update Patching Security Tracking – Secunia
IIS 7.0 Security Minimal Surface Area Automatic Site / Application
Sandboxing Anonymous User Account
Changes URL Authorization Built in Request Filtering Integrated Active Directory
Authorization
Security
![Page 19: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/19.jpg)
IIS 7.0 Manageability Centralized Web Farm
Configuration Streamlined and Focused
Administration Tool Remote Administration Tool Command Line
Administration Rapid Troubleshooting and
Limited Downtime
Management
![Page 20: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/20.jpg)
Enterprise Level Performance “Match.com runs IIS 7.0 with
30 million page views daily.” “PlentyOffFish.com gets 1.2
billion page views a month.” “WS2008 and IIS 7.0 allow
www.microsoft.com to process 122 million more requests at the same CPU level – compared to IIS 6.0”
“MySpace.com runs IIS 7.0 with 23 billion page views a month.”
IIS 7.0 Performance/Scalability Leaner Web Servers Server Core Static and Dynamic
Compression Output Caching
Improvements
Performance / Scalability
![Page 21: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/21.jpg)
IIS 7.0 Modularity Server functionality is split
into 40 modules Only 10 modules installed
by default Modules and a Generic
Pipeline Extensibility
IIS 7.0 Reliability Proven and Trusted Platform
54% of the Fortune 1000 rely on IIS 7.0
Rapid diagnostics tools to troubleshoot any concerns quickly Failed Request Tracing Runtime State and Control
API.
Reliability / Modularity
![Page 22: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/22.jpg)
IIS 7.0 Innovation IIS 7.0 Admin Pack URL Rewrite Module
(Technical Preview) PowerShell Provider for IIS Remote Manager – IIS 7 UI
for Down-level Clients Web Playlists
Innovation
![Page 23: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/23.jpg)
IIS 7.0 Troubleshooting Detailed Error Messages
Verbose Error Messages Suggests Causes and
Solutions Details include
configuration sections in question, modules in use, page, etc.
Failed Request Tracing Allows for custom
failure criteria per URL Persist Failure Log Files
beyond process lifetime Common Usages
Request take too long
Request Error (completes but with error code)
Troubleshooting
![Page 24: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/24.jpg)
IIS 7.0 Application Support Extensible, modular architecture
– add, remove or replace any built-in module
Enhanced ASP.NET integration including unified configuration, HTTP runtime and administration tools
Caching support (kernel and user) for all types of dynamic content
Built-in FastCGI support for Open Source frameworks such as PHP and Ruby.
Strong integration with other Enterprise Products such as SharePoint
Extensive Support for Streaming Media
Application Support
![Page 25: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/25.jpg)
IIS 7.0 - Cost of Ownership Rapid Troubleshooting and
Minimized Downtime Minimized Surface Area Isolation and Sandboxing Scalable Multi-Tenant
Hosting
Less Expensive Administrator Resources to Maintain
Delegated Control to Site Owners
Strong Microsoft Support Resources
TCO
![Page 26: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/26.jpg)
IIS 7.0 and PHP Support Consolidate .NET and PHP
applications on a single server Consolidate Web and Other Server
Management Frameworks to a single platform
Better Web Platform Management
Host on Minimal / Headless Server with Server Core
Powerful Media Serving Microsoft Supported Solution
PHP Applications
![Page 27: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/27.jpg)
IIS 7.0 has: A Modular and Extensible
Architecture Deep integration with .NET
Applications Improved Security Agile Administration Built in Troubleshooting Tools
such as Request Tracing
This leads to a Web Platform that is: Streamlined Easy to extend To Manage Quick to Troubleshoot Highly Secure
Summary
![Page 28: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/28.jpg)
Titre 1
PHP For Windows
Case Study + demo 4
![Page 29: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/29.jpg)
Titre 1
Windows Azure Platform + PHP
PHP ON The Cloud 5
![Page 30: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/30.jpg)
Introducing the Windows Azure Platform
![Page 31: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/31.jpg)
Private (On-Premise)
Infrastructure (as a Service)
Platform (as a Service)
Types of Clouds
Storage
Server HW
Networking
Servers
Databases
Virtualization
Runtimes
Applications
Security & Integration
Storage
Server HW
Networking
Servers
Databases
Virtualization
Runtimes
Applications
Security & Integration
Storage
Server HW
Networking
Servers
Databases
Virtualization
Runtimes
Applications
Security & Integration
You
man
age M
anaged by vendor
Managed by vendo
Yo
u m
anag
e
You
man
age
![Page 32: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/32.jpg)
Private (On-Premise)
Types of Clouds Infrastructure
(as a Service) Platform
(as a Service)
![Page 33: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/33.jpg)
Windows Azure for Application Developers
Portal Hosted Service
Storage
SDK
Develop Deploy Run
![Page 34: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/34.jpg)
Windows Azure Compute Roles
Role
Code Configuration
![Page 35: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/35.jpg)
Web vs. Worker Role Web Role
IIS Host
Your Code
Worker Role
System Host
Your Code
![Page 36: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/36.jpg)
Sample Application Architecture
http://yourapp.cloudapp.net
![Page 37: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/37.jpg)
Running PHP in Windows SDK for PHP @ http://phpazure.codeplex.com How to Do It Host in Web role (like .NET) Supply PHP runtime Point to runtime via FastCGI
configuration in Web.config Web.roleconfig
PHP Web Role Instance 2
VI P
Load
Ba
lanc
er
PHP Web Role Instance 1
![Page 38: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/38.jpg)
This is all you need! \HelloCloudPHP
ServiceDefinition.csdef ServiceConfiguration.cscfg \WebRole web.roleconfig web.config \php index.php <your php application> etc...
Make sure you change your php.ini to use relative paths!
![Page 39: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/39.jpg)
PHP with SQL Azure SQL Server Driver for PHP @
http://sqlsrvphp.codeplex.com/
Supports PHP access to SQL Azure
Features Choose between SQL Server and SQL Azure by changing
connection string Use from on-premises or in Windows Azure
![Page 40: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/40.jpg)
Lastly, Microsoft can help your company! BizSpark www.bizspark.com
For startups
Less than 3 years old Less than USD 1M in annual revenue Must make software product or service
You get a bunch of free stuff (software,
support, visibility)
Free Windows Azure usage (up to a certain limit)
WebsiteSpark www.websitespark.com
For companies that build web sites and
applications for their customers Less than 10 employees
You get a bunch of free stuff (software,
support, visibility)
No Windows Azure usage unfortunately…
![Page 41: Php apache vs iis By Hafedh Yahmadi](https://reader034.vdocument.in/reader034/viewer/2022050906/55589cebd8b42aa6708b4c5d/html5/thumbnails/41.jpg)
Titre 1 MERCI
ND E