PHP na Windows Artur Żarski Developer Evangelist

Slides:



Advertisements
Podobne prezentacje
20041 Projektowanie dynamicznych witryn internetowych Paweł Górczyński ASP 3.0.
Advertisements

Jarosław Kurek WZIM SGGW
Decyzje projektowe w .NET Framework
„Migracja środowisk Microsoft NT/Active Directory/Exchange oraz SharePoint do nowych wersji przy użyciu narzędzi Quest Software” Grzegorz Szafrański Product.
SQL Server Native XML Web Services
Tworzenie ASP.NET Web Form
Programowanie w środowiskach zintegrowanych wykład 1 PSZ Programowanie w Środowiskach Zintegrowanych > Systemy i środowiska zintegrowane > Środowisko zintegrowane.
PSZ wykład 1 > Systemy i środowiska zintegrowane
ASP.NET i platforma.NET Technologie internetowe ( ) Tomasz Popów
IIS 6 i PHP na serwerze Windows 2003 EE
P I OTR SKOŁYSZ. POCHODZENIE I CELE CZYM JEST.NET ? CO IMPLEMENTUJE MONO ? ŚRODOWISKO PRACY [MONODEVELOP] SYTEMY OPERACYJNE CO PROGRAMOWAĆ ? JĘZYKI PRZYKŁADOWY.
Systemy zarządzania treścią CMS
Przykład włamania do aplikacji internetowej poprzez modyfikację zapytań SQL Skrypty ASP Serwer bazy danych MS SQL Server Piotr Kuźniacki BDi.
Licencjonowanie Microsoft Office 2013
2017/3/28 Jak zyskać przewagę konkurencyjną wykorzystując najnowsze technologie Microsoft? Dariusz Grzesiński ISV Lead Central & Eastern Europe Developer.
Software Assurance dla dużych firm
Dodatkowe informacje na temat umów Open oraz Open Value.
Licencjonowanie wirtualizacji
Co tu robi Microsoft, czyli 10 mitów głównych
Przegląd programów licencyjnych dla instytucji z sektora publicznego oraz edukacyjnego i program SPLA.
Licencjonowanie rodziny System Center 2012
Licencjonowanie Exchange 2013
Licencjonowanie Lync 2013 Poziom 200.
Licencjonowanie SharePoint 2013
Podstawy umów Open oraz Open Value. Rozwiązania licencyjne firmy Microsoft Umowy Open Umowy Open Value Na wybrane komputery (Non company wide) Na całą
Rozwój aplikacji przy wykorzystaniu ASP.NET
Aplikacje Internetowe
Witold Bołt Wprowadzenie do .NET Witold Bołt
Web Serwisy w praktyce Technologie internetowe ( )
Bezpieczna platforma SharePoint
Collaborate more Platforma Office 2010 Sebastian Wilczewski Konsultant Betacom S.A.
Wirtualna baza SQL zgodna z SQL Server SQL as a Service
Technologie tworzenia aplikacji internetowych Wykład 3
Licencjonowanie aplikacji serwerowych
Licencjonowanie Windows 8
Ogólne informacje licencyjne Kluczowe funkcjonalności Dostępne wersje i porównanie Zasady licencjonowania Downgrade, SA Licencjonowanie w środowisku chmury.
Microsoft Dynamics CRM jako platforma deweloperska
Silverlight 3 Przegląd nowości
Usługi online oraz Office 365. Przegląd usług online Dodawanie usług online do umów grupowych Nabywanie licencji Office 365.
Podstawy modeli i programów licencyjnych Microsoft.
Licencjonowanie narzędzi dla programistów
Licencjonowanie rodziny produktów Forefront oraz System Center
Arkadiusz Twardoń ZTiPSK
Wykonał: Michał Nikołajuk
Automatyzacja zadań administracyjnych za pomocą Windows PowerShell
Systemy zarządzania treścią Wykład 5
Twoje nowoczesne biuro
Windows 8.1 dostarcza spójną platformę do tworzenia aplikacji, które potrafią dostosować się do wielu urządzeń Zaprojektowane raz, działają.
Projektowanie Aplikacji Internetowych Artur Niewiarowski Wydział Fizyki, Matematyki i Informatyki Politechnika Krakowska.
Technologie internetowe Wykład 5 Wprowadzenie do skrytpów serwerowych.
Technologie internetowe i mobilne
Przegląd usług online Dodawanie usług online do umów grupowych Nabywanie licencji Office 365.
DEMO Jak założyć konto na Microsoft Virtual Academy?
ASP.NET MVC od zera do praktyki
Object-relational mapping (aka O/RM, ORM, and O/R mapping)
Analiza problemów wydajnościowych w środowisku SharePoint 2013 Marcin Ciężak Support Escalation Engineer 06/11/201 5.
.NET Core Łukasz Co to takiego? Nowy, open-sourcowy framework pozwalający na pisanie cross-platformowych aplikacji z użyciem.NET.
Komponentowe systemy rozproszone
Łukasz Gąsior wrocnet – 16/02/2016
BÓG JEST SZEPTEM I POWIEWEM
Nowa Ewangelizacja „Jak zawsze, również i dziś celem ewangelizacji
Aktywacja i przypisanie dostępnych licencji Dynamics 365 w Microsoft Partner Network Instrukcja Ostatnia aktualizacja
Pobranie dostępnych licencji partnerskich i sprawdzenie ich liczby w Microsoft Partner Network Instrukcja Ostatnia aktualizacja
Twoje nowoczesne biuro
Zakup subskrypcji Microsoft Action Pack (MAPS) w programie Microsoft Partner Network Instrukcja Ostatnia aktualizacja
Aktywacja i przypisanie dostępnych licencji Office 365 w Microsoft Partner Network Instrukcja Ostatnia aktualizacja
Aplikacje i usługi internetowe
Podstawy programowania
NEMERLE Michał Maliszewski.
Szablon identyfikowania głównych zainteresowanych osób
Zapis prezentacji:

PHP na Windows Artur Żarski arturz@microsoft.com Developer Evangelist 3/28/2017 4:53 AM PHP na Windows Artur Żarski arturz@microsoft.com Developer Evangelist Microsoft Corporation © 2007 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.

Plan spotkania IIS7 jako platforma PHP na Windows SQL Server Driver for PHP Expression Web 2 Inne możliwości współdziałania

Microsoft i OpenSource? 3/28/2017 4:53 AM Microsoft i OpenSource? © 2007 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.

3/28/2017 4:53 AM © 2006 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.

Przykłady projektów PHP Azure API for PHP Phalanger PHP4VS WindowsLive for PHP PHPOpenXML API PHPRPC for .NET Excel document creation via OpenXML for PHP PHP Linq

3/28/2017 4:53 AM IIS7 - platforma © 2007 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.

Zalety IIS 7.0 Modularna architektura aby zredukować możliwość ataku Konfiguracja systemu oparta na XML Możliwość zdalnego zarządzania Zaawansowana diagnostyka Integracja z WMS oraz Media Pack Możliwość rozszerzenia IIS7 przy użyciu kodu zarządzanego

Dlaczego warto przejść na IIS7? (1/2) Konfiguracja w pliku tekstowym Apache: httpd.conf ale wymaga restartu przez admina IIS7: bez restartu + command line Rozproszona konfiguracja Apache: .htaccess Asp.net: web.config <system.webServer>, konfiguracja per-URL (per żądanie) Rozszerzalność (C/C++/C#/VB.NET/ 30+ innych języków ...) Nowy interfejs CHttpModule, łatwo zastąpić swoim SQL Logging (logowanie W3C w mniej niż 50 linii kodu)

Dlaczego warto przejść na IIS7? (2/2) Zaawansowana diagnostyka oraz rozwiązywanie problemów 'failed request tracing‘ request monitoring and runtime data Administracja i API AppCmd.exe WMI provider Microsoft.Web.Administration Inne: Application Request Routing Web Deployment Tool Bitrate Throttling / Smooth Streaming …

IIS7 .NET Extensibility – Moduł vs. Handler Moduły dostarczają usługi dla wszystkich żądań moduł Basic Authentication moduł Compression Handlery dostarczają usługi dla specyficznych rozszerzeń ISAPI handler (.dll) Static handler (.htm, .jpg, .gif, etc) IIS 7 pozwala na zarządzanie natywnymi i „zarządzanymi” modułami oraz handlerami. public class BasicAuthenticationModule : System.Web.IHttpModule { void Init(HttpApplication context) { } void Dispose() { } } Describe the difference between a handler and module. When would you use one vs. the other? Show the sections in Applicationhost.config where handler and module are defined. Note the “precondition” setting for managed code handlers indicates the module is only used if the Application Pool is in Integrated mode.

Skrypty: nowy WMI Provider Set oService = GetObject("winmgmts:root\WebAdministration") ' Tworzymy binding dla witryny Set oBinding = oService.Get("BindingElement").SpawnInstance_ oBinding.BindingInformation = "*:80:www.site.com" oBinding.Protocol = "http" ‘ Tworzymy witrynę oService.Get("Site").Create _ "NewSite", array(oBinding), "C:\inetpub\wwwroot" ' Tworzymy aplikację oService.Get("Application").Create _ "/foo", "NewSite", "C:\inetpub\wwwroot\foo"

Appcmd – listowanie i filtrowanie Potężne narzędzie do zarządzania IIS 7 z linii komend C:\> appcmd list sites SITE "Default Web Site" (id:1,bindings:HTTP/*:80:,state:Started) SITE "Site1" (id:2,bindings:http/*:81:,state:Started) SITE "Site2" (id:3,bindings:http/*:82:,state:Stopped) C:\> appcmd list requests REQUEST "fb0000008000000e" (url:GET /wait.aspx?time=10000,time:4276 msec,client:localhost) C:\> appcmd list requests /apppool.name:DefaultAppPool C:\> appcmd list requests /wp.name:3567 C:\> appcmd list requests /site.id:1

Programowanie: Microsoft.Web.Administration Nowe APIs pozwala programistom na pisanie własnych narzędzi do wdrażania, zarządzania ASP.NET oraz IIS ServerManager iisManager = new ServerManager(); foreach(WorkerProcess w3wp in iisManager.WorkerProcesses) {     Console.WriteLine("W3WP ({0})", w3wp.ProcessId);                  foreach (Request request in w3wp.GetRequests(0)) {         Console.WriteLine("{0} - {1},{2},{3}",                     request.Url,                     request.ClientIPAddr,                     request.TimeElapsed,                     request.TimeInState);     } }

Demo IIS7

PHP na Windows

Najważniejsze elementy 3/28/2017 4:53 AM ADOdb Pierwszy projekt Open Source, w którym MS brał udział SQL Server PHP Driver SQL Server Driver for PHP został stworzony aby umożliwić współpracę PHP z SQL Server IIS7+ FastCGI Podstawa PHP na Windows A few examples: Microsoft / Zend Technologies collaboration PHP optimized for Windows IIS FastCGI: solid platform for PHP on IIS 6/7 Tested/insured compatibility with many popular PHP applications Ongoing focus on making Windows/IIS an excellent platform for PHP applications Microsoft has provided a patch that provides ADOdb database abstraction layer support for the PHP SQL driver. What may be more significant to open-source advocates is that Microsoft is licensing the patch under the Free Software Foundation's lesser GPL (LGPL) licensing terms. SQL SERVER DRIVER The SQL Server Driver for PHP is designed to enable reliable, scalable integration with SQL Server for PHP applications deployed on the Windows platform. The Driver for PHP is a PHP 5 extension that allows the reading and writing of SQL Server data from within PHP scripts. It provides a procedural interface for accessing data in all Editions of SQL Server 2005 and SQL Server 2008 (including Express Editions), and makes use of PHP features, including PHP streams to read and write large objects. The release of SQL Server Driver for PHP v1.0 marks another step in Microsoft’s continued commitment to interoperability.  Earlier this year, the release of IIS 7.0 and its FastCGI support was the major step towards making Windows the platform of choice for both developing and deploying PHP applications. To show our level of commitment to the PHP community, we've also posted the source code for our driver to Microsoft's CodePlex site.  This release of the SQL Server PHP driver makes it easier for the PHP development community to use SQL Server as their database of choice for PHP applications.  We encourage you to download our driver and explore the sample application described in the .chm file.  If you'd prefer to access our documentation on-line, it's available on the MSDN site.  To keep up with our announcements and customer feedback, please check out our team blog or the MSDN forum site for the driver. IIS7 IIS 7.0 offers new capabilities that dramatically improve the way Web solutions are developed, deployed, and managed.  Modular architecture in IIS 7 provides additional functionality to PHP applications. IIS had always supported PHP, but in a way that precluded many real-life PHP applications from being hosted in production environments. This was due to limitations in the two ways IIS offered for running PHP applications: using the Common Gateway Interface (CGI) protocol or using the PHP ISAPI extension. Because CGI requires a separate process for each request, apps hosted using CGI would perform poorly on Windows. Conversely, PHP apps using the IIS high-performance multithreaded ISAPI interface would often suffer from instability due to the lack of thread safety in some popular PHP extensions. In an attempt to solve these problems, the IIS team developed the FastCGI component. The open FastCGI protocol allows PHP and many other application frameworks that require a single-threaded environment (including Ruby on Rails, Perl, and Python) to run more reliably on IIS. Unlike the standard CGI implementation, FastCGI enables process reuse by maintaining a pool of worker processes, each processing no more than one request at a time, thus resulting in much-improved performance. FastCGI also benefitted from a community-centric development and testing model. Expression WEB 2.0 About Expression Microsoft Expression Studio takes your creative possibilities to a new level. The professional design tools and innovative technologies in Expression Studio give you the flexibility and freedom to bring your vision to reality—whether you are designing standards-based Web sites, rich user experiences for the desktop and Silverlight, or managing digital assets and content. Edit PHP pages Broaden your scope by now editing PHP sites with Expression Web 2. Apply the full set of standards based design tools to a wider range of sites. Expression Web 2.0 Wsparcie narzędzi MS do pracy z PHP © 2006 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.

IIS FastCGI Solidna platforma dla aplikacji PHP vs. ISAPI: vs. CGI: Otwarty standard Wspierane przez środowisko PHP oraz wiele innych frameworków open source (RoR, Perl, Python, …) Ulepszenie CGI Web server tworzy proces FastCGI dla pierwszego żądania Web server wykorzystuje istniejące procesy FastCGI dla następnych żądań Konfigurowalne zasoby vs. ISAPI: Dostarcza wymaganą stabilność dla aplikacji PHP typu non-thread-safe vs. CGI: Drastyczny wzrost wydajności

IIS FastCGI – Zasada działania FastCGI process pool for PHP5 IIS Worker Process FastCGI handler ASP.NET Static FastCGI over named pipes lub TCP Read Configuration Authenticate Authorize Map Request Handle Request Send Response Log Request php-cgi.exe FastCGI process pool for PHP4 Request queue php.exe

Uruchomienie aplikacji PHP na IIS 7.0 Łatwy setup: Instalacja PHP z FastCGI Wdrożenie aplikacji Kompatybilność: Top 10 aplikacji PHP testowane i udokumentowane na www.iis.net/php Łatwa migracja ze wsparciem Url Rewrite

Demo PHP

SQL Server PHP Driver Zalety: Pozwala na pewną i skalowaną integrację z SQL Server Tworzenie aplikacji na silnym i bezpiecznym silniku BD BI oraz SQL Reporting Services Konfiguracja: Php.ini -> extension=php_sqlsrv.dll Połączenie: $serverName = "(local)"; $connectionOptions = array("Database"=>"AdventureWorks");

Demo SQL driver for PHP

Microsoft® Expression® Web 2 PHP 5.2.5, Fast CGI Intellisense, code-coloring oraz snippety Podgląd „PHP include” w trybie projektowanie Podgląd stron PHP na różnych zainstalowanych przeglądarkach przy pomocy wbudowanego Webservera

Demo Expression Web 2

PHP na Windows – dalsze możliwości

PHP i Silverlight Działa na IIS i Apache Wymaga dodania dwóch MIME types dla Silverlight .xaml – application/xaml+xml .xab – application/x-silverlight-app Brak ustawień = błąd 404.3

PHP i ASP.NET Membership + AJAX Kompletne zarządzane API PHP on Windows Microsoft SQL Server Driver for PHP Web Services .NET / COM PHP On Linux FreeTDS Sockets

PHP i obiekty COM Czym jest COM (Component Object Model) ? PHP tak naprawdę nie używa COM. COM jest dowolnym językiem Windows VB C++ Delphi Python Perl Cobol Fortran COM - standard definiowania i tworzenia interfejsów programistycznych na poziomie binarnym dla komponentów software wprowadzony przez firmę Microsoft wraz z bibliotekami zapewniającymi podstawowe ramy i usługi dla współdziałania komponentów COM i aplikacji.

Tworzenie obiektów COM <?php $myCOMObject =new COM("COMObject.COMClass"); $myCOMObject->someMethod(“Some Argument”); ?>

Inne możliwości Microsoft Office Web Services Microsoft .NET NuSOAP PHP 5 – Native SOAP Extension ezSOAP PEAR::SOAP Microsoft .NET Microsoft Services (np. Live, Azure) Phalanger

PHP – „Wish List” Natywne API dla Active Directory AzMan API dla PHP PHP Bridge dla ADAM ASP.NET 2.0 Authentication Provider dla PHP A CDO / Exchange Bridge dla PHP PHP-Nuke, Mambo, etc. etc. Na MS SQL Server Opcjonalnie dla Phalanger Opcjonalnie dla AD

Common Language Runtime VS.NET System.Web (ASP.NET) System.WinForms SessionState UI C# Caching HtmlControls Design ComponentModel JScript Security WebControls Configuration System.Drawing VB Simple Web Services Drawing2D Printing VC/MC++ Protocols Discovery Description Imaging Text Debugger Designers System.Data (ADO.NET) System.Xml ADO SQL XPath XSLT Serialization SDK Tools Design Adapters CorDBG System ILAsm Collections IO Security Runtime ILDbDump Configuration Net ServiceProcess InteropServices Diagnostics Reflection Text Remoting SN Globalization Resources Threading Serialization ILDAsm Common Language Runtime MetaInfo GC App Domain Loader JIT PEVerify MSIL Common Type System Class Loader Platform Abstraction Threads Boot Loader Sync Timers Networking Filesystem

Podsumowanie

3/28/2017 4:53 AM © 2008 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. © 2007 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.