php iis microsoft
DESCRIPTION
Php iis microsoftTRANSCRIPT
![Page 1: Php iis microsoft](https://reader033.vdocuments.site/reader033/viewer/2022050801/554d3612b4c905b0708b456b/html5/thumbnails/1.jpg)
MICROSOFT, IIS7 AND PHP
Nick HodgeMicrosoft AustraliaProfessional [email protected]
Jorke OdolphiMicrosoft AustraliaWeb Infrastructure [email protected]
![Page 2: Php iis microsoft](https://reader033.vdocuments.site/reader033/viewer/2022050801/554d3612b4c905b0708b456b/html5/thumbnails/2.jpg)
This is not your father’s Microsoft
![Page 3: Php iis microsoft](https://reader033.vdocuments.site/reader033/viewer/2022050801/554d3612b4c905b0708b456b/html5/thumbnails/3.jpg)
![Page 4: Php iis microsoft](https://reader033.vdocuments.site/reader033/viewer/2022050801/554d3612b4c905b0708b456b/html5/thumbnails/4.jpg)
IIS Request Processing
Server functionality is split into ~ 40 modules...Modules plug into a generic request pipeline…Modules extend server functionality through a public module API.
Send ResponseLog Compress
NTLM Basic
Determine
Handler
CGIStatic File
ISAPI
AuthenticationAnon
SendResponse
Authentication
Authorization
ResolveCache
ExecuteHandler
UpdateCache…
…
…
ASP.NET
PHP
Monolithic implementation Install all or nothing…
Extend server functionality only through ISAPI…
![Page 5: Php iis microsoft](https://reader033.vdocuments.site/reader033/viewer/2022050801/554d3612b4c905b0708b456b/html5/thumbnails/5.jpg)
IIS 6.0 ASP.NET Processing
Runtime limitations
Only sees ASP.NET requests
Feature duplication
Send ResponseLog Compress
NTLM Basic
Determine
Handler
CGIStatic File
ISAPI
AuthenticationAnon
…
…
AuthenticationForms
Windows
Map Handler
ASPXTrace
……
…
aspnet_isapi.dll
![Page 6: Php iis microsoft](https://reader033.vdocuments.site/reader033/viewer/2022050801/554d3612b4c905b0708b456b/html5/thumbnails/6.jpg)
IIS6 Application Framework support
Common Gateway Interface (CGI) for CGI and PHP applications Benefits
Very simple to implement and use – single-threaded execution
Disadvantages Poor performance due to high process creation cost Creates and passes request data to a new CGI
process Waits for CGI process to produce response Shuts down CGI process
![Page 7: Php iis microsoft](https://reader033.vdocuments.site/reader033/viewer/2022050801/554d3612b4c905b0708b456b/html5/thumbnails/7.jpg)
IIS6 Application Framework support
Internet Server Application Programming Interface (ISAPI) Benefit of ISAPI
Can be extremely fast when written correctly
Disadvantage of ISAPI Must be thread-safe (many PHP
extensions are not!) Requires development in C++
![Page 8: Php iis microsoft](https://reader033.vdocuments.site/reader033/viewer/2022050801/554d3612b4c905b0708b456b/html5/thumbnails/8.jpg)
PHP Setup
Binaries •Use zip file with non-thread safe binaries•OR download PHP installer
Configure php.ini•fastcgi.impersonate = 1•cgi.fix_pathinfo = 1•open_basedir = “C:\inetpub\website\Folder”
Configure IIS•Enable CGI•Configure FastCGI handler mapping for *.php•Change FastCGI settings
Test that it works •C:\php\php-cgi.exe –info•http://localhost/phpinfo.php
![Page 9: Php iis microsoft](https://reader033.vdocuments.site/reader033/viewer/2022050801/554d3612b4c905b0708b456b/html5/thumbnails/9.jpg)
Per-site PHP configurationConfiguring FastCGI process pool
<fastCgi> <application fullPath="C:\PHP\php-cgi.exe" arguments="-d my.website=website1"> <environmentVariables> <environmentVariable name="PHPRC" value="C:\WebSites\website1" /> </environmentVariables> </application></fastCgi>
Combination of fullPath and arguments uniquely identify FastCGI process pool definition
PHPRC environment variable contains path to the php.ini file
![Page 10: Php iis microsoft](https://reader033.vdocuments.site/reader033/viewer/2022050801/554d3612b4c905b0708b456b/html5/thumbnails/10.jpg)
IIS Extensions
Mod_rewrite support for URL rewriting
![Page 11: Php iis microsoft](https://reader033.vdocuments.site/reader033/viewer/2022050801/554d3612b4c905b0708b456b/html5/thumbnails/11.jpg)
SQLServer 2008
Express version with Management Studio Free (as in beer) download
MySQL .NET drivers (data import/export)
Open source: Microsoft SQLServer Driver for PHP
![Page 12: Php iis microsoft](https://reader033.vdocuments.site/reader033/viewer/2022050801/554d3612b4c905b0708b456b/html5/thumbnails/12.jpg)
Resources
http://learn.iis.net
http://port25.technet.com
http://codeplex.com/http://port25.technet.com/archive/2008/07/25/osp.aspx