PHP on Windows
-
Upload
maarten-balliauw -
Category
Technology
-
view
3.181 -
download
1
description
Transcript of PHP on Windows
![Page 1: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/1.jpg)
APRIL 12, 2023 | SLIDE 1
![Page 2: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/2.jpg)
APRIL 12, 2023 | SLIDE 2
www.realdolmen.com
PHP on Windows
Maarten Balliauw – RealDolmenE-mail: [email protected]
Blog: http://blog.maartenballiauw.be Twitter: @maartenballiauw
![Page 3: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/3.jpg)
APRIL 12, 2023 | SLIDE 3
WHO AM I?
Maarten Balliauw Antwerp, Belgium www.realdolmen.com Focus on web
ASP.NET, ASP.NET MVC, PHP, Azure, VSTS, … MVP ASP.NET
Interested in interoperability PHPExcel, PHPLinq, Windows Azure SDK for PHP, ...
http://blog.maartenballiauw.be http://twitter.com/maartenballiauw
![Page 4: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/4.jpg)
APRIL 12, 2023 | SLIDE 4
AGENDA
Why PHP matters… An overview of initiatives
PHP core development FastCGI WinCache extension SQL Server driver for PHP Microsoft Web Platform Installer SDK’s Tooling SEO Optimization Tool
Resources Q&A
![Page 5: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/5.jpg)
APRIL 12, 2023 | SLIDE 5
WHY PHP MATTERS…
Web applications Wordpress Drupal Joomla phpBB MediaWiki SugarCRM Gallery2
Commercial entities Yahoo! Flickr Digg Facebook YouTube Wikipedia
Hard to ignore!
![Page 6: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/6.jpg)
APRIL 12, 2023 | SLIDE 6
PHP ON WINDOWSIf PHP matters, better make it a first-class citizen…
![Page 7: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/7.jpg)
APRIL 12, 2023 | SLIDE 7
MICROSOFT AND THE PHP COMMUNITY
BeforeNo Core developer working on or for Windows
Windows was a 2nd class platform
Binaries releases days or weeks after the sources releases
Absence QA on Windows
Lack of documentation and communication
NowCreation of the Windows Internals Team
•2 core developers•7 regular helpers, contributors or testers (growing)
Windows is now a primary platform
Synchronized releases•5.2.6, 5.2.7, 5.2.8, 5.3.0 beta
QA on Windows•95% of the core tests pass on Windows
Dedicated communication channels
•Mailing list, Windows internal list, iis.net/php(http://www.php.net/mailing-lists.php)•IRC channel on freenode #php-dev-win
![Page 8: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/8.jpg)
APRIL 12, 2023 | SLIDE 8
HTTP://WINDOWS.PHP.NET
![Page 9: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/9.jpg)
APRIL 12, 2023 | SLIDE 9
PHP 5.3 ON WINDOWS
Is the most significant update to PHP on Windows!
All libraries updated to latest versions(in some cases newer versions that used on Linux)
Re-write of the build system from scratch Top PHP Windows community programmer working for
Microsoft (Pierre Joye) Build with VS 2008 Available in 32 and 64 bit version Created windows.php.net 99% of all POSIX calls changed to native Windows calls
![Page 10: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/10.jpg)
APRIL 12, 2023 | SLIDE 10
BY THE NUMBERS: RUNNING PHPBENCH LOOPED 5X Both computers are a HP 8 core (2 procs x Quad core)
16gb ram. Linux (Centos 5.2) vs. Windows Server 2008 x86
NOTE: phpbench onlytests internal PHP engineperformance. It doesnot do IO of any kind.
Windows 5.2 Linux 5.2 Linux 5.3 Optimized
Windows 5.3 Windows 5.3 Optimized
0
5
10
15
20
25
30
3530.194
27.9609999999999
20.1140000000001 19.985
16.436
PHPBench 5x Looped Run In Seconds
Time
![Page 11: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/11.jpg)
APRIL 12, 2023 | SLIDE 11
FASTCGI ON IISHow and where will my application run?
![Page 12: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/12.jpg)
APRIL 12, 2023 | SLIDE 12
PHP ON WINDOWS – HISTORY
IIS support has been there for a long time Apache runs on Windows as well
But… IIS gives best performance on Windows Unfortunately the choice was always between stability and
performance…
![Page 13: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/13.jpg)
APRIL 12, 2023 | SLIDE 13
ALLOW ME TO EXPLAIN…
CG
I A new php.exe process for every requestAdvantage• Very stable!
Disadvantage• Slow due to I/O
overhead of process creation on Windows
ISA
PI PHP loaded as an extension in IIS’ memory spaceAdvantage• Better
performance
Disadvantage• Not that stable…• Many PHP
extensions are not thread safe
![Page 14: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/14.jpg)
APRIL 12, 2023 | SLIDE 14
AND ALONG CAME IMPROVEMENT!C
GI A new php.exe
process for every requestAdvantage• Very stable!Disadvantage• Slow due to I/O
overhead of process creation on Windows
ISA
PI PHP loaded as
an extension in IIS’ memory spaceAdvantage• Better
performanceDisadvantage• Not that stable…• Many PHP
extensions are not thread safe
Fast
CG
I Process caching and pooling mechanismAdvantage• Faster than CGI• More Stable than
ISAPI• Can run non-
thread-safe versions of PHP extensions
![Page 15: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/15.jpg)
APRIL 12, 2023 | SLIDE 15
FASTCGI
![Page 16: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/16.jpg)
APRIL 12, 2023 | SLIDE 16
DEMOFastCGI on IIS
![Page 17: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/17.jpg)
APRIL 12, 2023 | SLIDE 17
IIS EXECUTION PIPELINE
Since your PHP app is part of the IIS execution pipeline… …you can use IIS URL rewriting …you can use IIS as a load balancer (ARR)
www.viprive.com …you can use any HttpModule out there
ASP.NET membership / authentication Output caching …
![Page 18: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/18.jpg)
APRIL 12, 2023 | SLIDE 18
WINCACHE EXTENSIONMaking it even faster…
![Page 19: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/19.jpg)
APRIL 12, 2023 | SLIDE 19
WINDOWS CACHE EXTENSION (“WINCACHE”)
PHP module for 5.2 and 5.3 IIS specific PHP accelerator
So only works in IIS!
No code modifications needed in your application Cache layers:
Bytecode cache – Caches compiled PHP scripts Script cache – Cache script sources in memory to reduce I/O
access and UNC file share access Relative file path cache – Caches relative file path Session cache – Sessions stored in shared memory
PHP functions to obtain information about the cache status
http://www.iis.net/download/WinCacheForPhp
![Page 20: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/20.jpg)
APRIL 12, 2023 | SLIDE 20
DEMOWinCache extension
![Page 21: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/21.jpg)
APRIL 12, 2023 | SLIDE 21
SQL SERVER DRIVER FOR PHP
Data access should be fast as well!
![Page 22: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/22.jpg)
APRIL 12, 2023 | SLIDE 22
SQL SERVER DRIVER FOR PHP V1.1
PHP extension for Windows So only works on Windows!
Reliable, scalable and fast integration with SQL Server for PHP
Relies on the Microsoft SQL Server Native Client to communicate with SQL Server.
http://bit.ly/cwDLR1
![Page 23: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/23.jpg)
APRIL 12, 2023 | SLIDE 23
“Did you just forgetto mention PDO support?”
![Page 24: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/24.jpg)
APRIL 12, 2023 | SLIDE 24
NO, THERE IS NO PDO SUPPORT. OH, WAIT!
Unless you want the new CTP bits!
SQL Server Driver for PHP v2.0 CTP Support for PHP Data Objects (PDO) Better UTF-8 support Example: Drupal 7 on SQL Server
http://www.commerceguys.com/about/news/drupal-7-sql-server-preview
http://bit.ly/cjGvO3
![Page 25: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/25.jpg)
APRIL 12, 2023 | SLIDE 25
HERE ARE YOUR OPTIONS!
![Page 26: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/26.jpg)
APRIL 12, 2023 | SLIDE 27
MICROSOFT WEB PLATFORM INSTALLER
“Yum for Windows”?
![Page 27: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/27.jpg)
APRIL 12, 2023 | SLIDE 28
EASY INSTALLATION OF YOUR ENVIRONMENT
Easy installer providing Platform installation (IIS, extra modules, configuration, …)
Both ASP.NET and PHP Application installation
Both ASP.NET and PHP
http://microsoft.com/web
![Page 28: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/28.jpg)
APRIL 12, 2023 | SLIDE 29
DEMOWeb Platform Installer
![Page 29: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/29.jpg)
APRIL 12, 2023 | SLIDE 30
SDK’SWhat else is out there?
![Page 30: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/30.jpg)
APRIL 12, 2023 | SLIDE 31
MICROSOFT AND PHP = LOTS OF GOODIES
Some highlights… SQL Server Reporting Services SDK for PHP OData SDK for PHP Windows Azure Tools for Eclipse Windows Azure SDK for PHP AppFabric SDK for PHP Windows Azure Command-Line Tools for PHP Eclipse Tools for Silverlight Information Cards for PHP Internet Explorer Webslices and Accelerators for PHP PHP and Silverlight SQL CRUD Application Wizard for PHP Toolkit for PHP and Bing Maps
Overview: http://www.interoperabilitybridges.com/
![Page 31: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/31.jpg)
APRIL 12, 2023 | SLIDE 32
SQL Server Reporting Services SDK for PHP
SSRS? Reporting tool in SQL Server Very powerful! Various output formats Can be linked to MySQL, PostgreSQL, …
API to interoperate with SQL Server Reporting Services List available reports within a PHP applications, Provide custom parameters from a PHP web form, Manage the rendering of the reports within a PHP application
http://ssrsphp.codeplex.com
![Page 32: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/32.jpg)
APRIL 12, 2023 | SLIDE 33
OData SDK for PHP
OData? Open Data Protocol Unlock your data and free it from silos that exist in applications
today Builds on HTTP, AtomPub and JSON RESTful interface Way data is delivered in MS CN “Dallas”
API to OData Generate proxy classes to OData feeds CRUD on OData feeds
http://odataphp.codeplex.com/
![Page 33: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/33.jpg)
APRIL 12, 2023 | SLIDE 34
OData SDK for PHP
/* connect to the OData service */ $svc = new NorthwindEntities(NORTHWIND_SERVICE_URL); /* get the list of Customers in the USA +the list of Orders */ $query = $svc->Customers() ->filter("Country eq 'USA'") ->Expand('Orders'); $customerResponse = $query->Execute();
/* get only CustomerID and CustomerName */ $query = $svc->Customers() ->filter("Country eq 'USA'") ->Select('CustomerID, CustomerName'); $customerResponse = $query->Execute();
/* create a new customer */ $customer = Customers::CreateCustomers('channel9', 'CHAN9'); $proxy->AddToCustomers($customer);
/* commit the change on the server */ $proxy->SaveChanges();
![Page 34: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/34.jpg)
APRIL 12, 2023 | SLIDE 35
Windows Azure
Microsoft’s Cloud Computing offering Web/worker role (= virtual machine) Blobs, tables, queues, drives (= storage) SQL Azure (= +/- SQL Server) AppFabric (= access control & firewall punching) “Dallas” (= Data-as-a-Service)
Working with PHP Windows Azure Tools for Eclipse Windows Azure SDK for PHP AppFabric SDK for PHP Windows Azure Command-Line Tools for PHP Zend Framework contribution
![Page 35: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/35.jpg)
APRIL 12, 2023 | SLIDE 36
TOOLINGHow do I use all this?
![Page 36: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/36.jpg)
APRIL 12, 2023 | SLIDE 37
MICROSOFT EXPRESSION WEB
![Page 37: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/37.jpg)
APRIL 12, 2023 | SLIDE 38
WINDOWS AZURE TOOLS FOR ECLIPSE
![Page 38: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/38.jpg)
APRIL 12, 2023 | SLIDE 39
SILVERLIGHT TOOLS FOR ECLIPSE
![Page 39: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/39.jpg)
APRIL 12, 2023 | SLIDE 40
SEO OPTIMIZATION TOOL
![Page 40: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/40.jpg)
APRIL 12, 2023 | SLIDE 41
What’s in the cloud?RESOURCESWhere can I learn more?
![Page 41: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/41.jpg)
APRIL 12, 2023 | SLIDE 42
RESOURCES
Microsoft Windows Azure Interop http://www.microsoft.com/windowsazure/interop/
Interop Bridges http://www.interoperabilitybridges.com/
![Page 42: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/42.jpg)
APRIL 12, 2023 | SLIDE 43
SUMMARY
PHP on Windows is a priority for Microsoft Full range of PHP support Products and Services Attract more customers to the MS platform through
world-class support and resources Microsoft wants you to succeed
![Page 43: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/43.jpg)
APRIL 12, 2023 | SLIDE 44
QUESTIONSPossibly Answers
![Page 44: PHP on Windows](https://reader036.fdocuments.net/reader036/viewer/2022062513/555298c7b4c9051f108b4fbb/html5/thumbnails/44.jpg)
APRIL 12, 2023 | SLIDE 45
THANK YOU!
Maarten Balliauwhttp://blog.maartenballiauw.be