IIS 7/7.5 – Configuring PHP via FastCGI on Windows Server 2008 R2

     PHP is a fantastic dynamic programing language which runs great on IIS, but can be a bit slow at times. Traditionally PHP runs on IIS either as an ISAPI extension or as a Common Gateway Interface (CGI) program, running PHP via FastCGI can be a great way to improve performance depending on your application. In this video I demonstrate how to manually setup and configure PHP via FastCGI using PHP 5.5.4 on IIS. You’ll want to make sure you use the Non Thread Safe version of php!

PHP.ini Settings:

;Changes for FastCGI

fastcgi.impersonate = 1
cgi.fix_pathinfo = 1
cgi.force_redirect = 0

;Enable any needed extensions
extension_dir = “ext”

;Optional, Restrict PHP file access to content folder
open_basedir = Path to site content

IIS Handler Mapping/Module Mapping settings:

Request Path: *.php
Module: FastCgiModule
Executable: C:\PHP_Install_Location\php-cgi.exe
Name: PHP via FastCGI



Comments are closed.