Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

PHP on Windows


Published on

PHP on Windows introduction

Published in: Technology
  • Be the first to comment

  • Be the first to like this

PHP on Windows

  1. 1.
  2. 2. PHP on Windows<br />Maarten Balliauw – RealDolmenE-mail: maarten.balliauw@realdolmen.comBlog: http://blog.maartenballiauw.beTwitter: @maartenballiauw<br />
  3. 3. Who am I?<br />Maarten Balliauw<br />Antwerp, Belgium<br /><br />Focus on web<br />ASP.NET, ASP.NET MVC, PHP, Azure, VSTS, …<br />MVP ASP.NET<br />Interested in interoperability<br />PHPExcel, PHPLinq, Windows Azure SDK for PHP, ...<br /><br /><br />
  4. 4. Agenda<br />Why PHP matters…<br />An overview of initiatives<br />PHP core development<br />FastCGI<br />WinCache extension<br />SQL Server driver for PHP<br />Microsoft Web Platform Installer<br />SDK’s<br />Tooling<br />SEO Optimization Tool<br />Resources<br />Q&A<br />
  5. 5. Why PHP matters…<br />Web applications<br />Wordpress<br />Drupal<br />Joomla<br />phpBB<br />MediaWiki<br />SugarCRM<br />Gallery2<br />Commercial entities<br />Yahoo!<br />Flickr<br />Digg<br />Facebook<br />YouTube<br />Wikipedia<br /> Hard to ignore!<br />
  6. 6. PHP on Windows<br />If PHP matters, better make it a first-class citizen…<br />
  7. 7. Microsoft and the PHP Community<br />Before<br />Now<br />
  8. 8.<br />
  9. 9. PHP 5.3 on Windows<br />Is the most significant update to PHP on Windows!<br />All libraries updated to latest versions(in some cases newer versions that used on Linux)<br />Re-write of the build system from scratch<br />Top PHP Windows community programmer working for Microsoft (Pierre Joye)<br />Build with VS 2008<br />Available in 32 and 64 bit version<br />Created<br />99% of all POSIX calls changed to native Windows calls<br />
  10. 10. By the numbers: Running PHPBench looped 5x<br />Both computers are a HP 8 core (2 procs x Quad core) 16gb ram.<br />Linux (Centos 5.2) vs. Windows Server 2008 x86<br />NOTE: phpbench onlytests internal PHP engineperformance. It doesnot do IO of any kind.<br />
  11. 11. FastCGI on IIS<br />How and where will my application run? <br />
  12. 12. PHP on Windows – History<br />IIS support has been there for a long time<br />Apache runs on Windows as well<br />But…<br />IIS gives best performance on Windows<br />Unfortunately the choice was always between stability and performance…<br />
  13. 13. Allow me to explain…<br />
  14. 14. And along came improvement!<br />
  15. 15. FastCGI<br />
  16. 16. Demo<br />FastCGI on IIS<br />
  17. 17. IIS execution pipeline<br />Since your PHP app is part of the IIS execution pipeline…<br />…you can use IIS URL rewriting<br />…you can use IIS as a load balancer (ARR)<br /><br />…you can use any HttpModule out there<br />ASP.NET membership / authentication<br />Output caching<br />…<br />
  18. 18. WinCache extension<br />Making it even faster…<br />
  19. 19. Windows Cache Extension (“WinCache”)<br />PHP module for 5.2 and 5.3<br />IIS specific PHP accelerator<br />So only works in IIS!<br />No code modifications needed in your application<br />Cache layers:<br />Bytecode cache – Caches compiled PHP scripts<br />Script cache – Cache script sources in memory to reduce I/O access and UNC file share access<br />Relative file path cache – Caches relative file path<br />Session cache – Sessions stored in shared memory<br />PHP functions to obtain information about the cache status<br /><br />
  20. 20. Demo<br />WinCache extension<br />
  21. 21. SQL Server Driver for PHP<br />Data access should be fast as well!<br />
  22. 22. SQL Server Driver for PHP v1.1<br />PHP extension for Windows<br />So only works on Windows!<br />Reliable, scalable and fast integration with SQL Server for PHP<br />Relies on the Microsoft SQL Server Native Client to communicate with SQL Server.<br /><br />
  23. 23. “Did you just forgetto mention PDO support?”<br />
  24. 24. No, there is no PDO support. Oh, wait!<br />Unless you want the new CTP bits!<br />SQL Server Driver for PHP v2.0 CTP<br />Support for PHP Data Objects (PDO)<br />Better UTF-8 support<br />Example: Drupal 7 on SQL Server<br /><br />
  25. 25. Here are your options!<br />
  26. 26. Demo<br />SQL Server Driver for PHP<br />
  27. 27. Microsoft Web Platform Installer<br />“Yum for Windows”?<br />
  28. 28. Easy installation of YOUR environment<br />Easy installer providing<br />Platform installation (IIS, extra modules, configuration, …)<br />Both ASP.NET and PHP<br />Application installation<br />Both ASP.NET and PHP<br /><br />
  29. 29. Demo<br />Web Platform Installer<br />
  30. 30. SDK’s<br />What else is out there?<br />
  31. 31. Microsoft and PHP = LOTS of goodies<br />Some highlights…<br />SQL Server Reporting Services SDK for PHP<br />OData SDK for PHP<br />Windows Azure Tools for Eclipse<br />Windows Azure SDK for PHP<br />AppFabric SDK for PHP<br />Windows Azure Command-Line Tools for PHP<br />Eclipse Tools for Silverlight<br />Information Cards for PHP<br />Internet Explorer Webslices and Accelerators for PHP<br />PHP and Silverlight<br />SQL CRUD Application<br />Wizard for PHP Toolkit for PHP and Bing Maps<br />Overview:<br />
  32. 32. SQL Server Reporting Services SDK for PHP<br />SSRS?<br />Reporting tool in SQL Server<br />Very powerful!<br />Various output formats<br />Can be linked to MySQL, PostgreSQL, …<br />API to interoperate with SQL Server Reporting Services<br />List available reports within a PHP applications,<br />Provide custom parameters from a PHP web form,<br />Manage the rendering of the reports within a PHP application<br /><br />
  33. 33. OData SDK for PHP<br />OData?<br />Open Data Protocol<br />Unlock your data and free it from silos that exist in applications today<br />Builds on HTTP, AtomPub and JSON<br />RESTful interface<br />Way data is delivered in MS CN “Dallas”<br />API to OData<br />Generate proxy classes to OData feeds<br />CRUD on OData feeds<br /><br />
  34. 34. OData SDK for PHP<br />/* connect to the OData service */<br /> $svc = new NorthwindEntities(NORTHWIND_SERVICE_URL);<br />/* get the list of Customers in the USA +the list of Orders */<br /> $query = $svc->Customers()<br /> ->filter("Country eq 'USA'")<br /> ->Expand('Orders');<br /> $customerResponse = $query->Execute();<br />/* get only CustomerID and CustomerName */<br /> $query = $svc->Customers()<br /> ->filter("Country eq 'USA'")<br /> ->Select('CustomerID, CustomerName');<br /> $customerResponse = $query->Execute();<br />/* create a new customer */<br /> $customer = Customers::CreateCustomers('channel9', 'CHAN9');<br /> $proxy->AddToCustomers($customer); <br />/* commit the change on the server */ <br /> $proxy->SaveChanges();<br />
  35. 35. Windows Azure<br />Microsoft’s Cloud Computing offering<br />Web/worker role (= virtual machine)<br />Blobs, tables, queues, drives (= storage)<br />SQL Azure (= +/- SQL Server)<br />AppFabric (= access control & firewall punching)<br />“Dallas” (= Data-as-a-Service)<br />Working with PHP<br />Windows Azure Tools for Eclipse<br />Windows Azure SDK for PHP<br />AppFabric SDK for PHP<br />Windows Azure Command-Line Tools for PHP<br />Zend Framework contribution<br />
  36. 36. Tooling<br />How do I use all this?<br />
  37. 37. Microsoft Expression Web<br />
  38. 38. Windows Azure Tools for Eclipse<br />
  39. 39. Silverlight Tools for Eclipse<br />
  40. 40. SEO Optimization Tool<br />
  41. 41. What’s in the cloud?<br />Resources<br />Where can I learn more?<br />
  42. 42. Resources<br />Microsoft Windows Azure Interop<br /><br />InteropBridges<br /><br />
  43. 43. Summary<br />PHP on Windows is a priority for Microsoft<br />Full range of PHP support Products and Services<br />Attract more customers to the MS platform through world-class support and resources <br />Microsoft wants you to succeed<br />
  44. 44. Questions<br />Possibly Answers<br />
  45. 45. THANK YOU!<br />Maarten Balliauw<br />