Install FAST CGI on IIS7

Preface- 

This article assumes you already have IIS7 installed.

This installation uses non-thread-safe PHP 5.2.3

I. Install PHP
 (http://www.iis.net/articles/view.aspx/IIS7/Hosting-Web-Applications/PHP/Using-FastCGI-to-host-PHP-applications-on-IIS7)

  1. Unzip the contents of the PHP 5.2.3 download into C:\PHP.
  2. Copy the PHP.INI-dist file to PHP.INI under the c:\windows directory.
  3. Open the PHP.INI file in Windows Notepad and make the following changes.
    1. Change: extension_dir = "C:\PHP\ext"
    2. Disable Force Redirect: cgi.force_redirect = 0 
  4. Install IonCube (if needed)
    1. Download here
    2. Add the following line to your PHP.ini
      zend_extension_ts = "<drive>:\<path>\ioncube_loader_win_<php flavour>.dll"
  5. Save the PHP.INI file and close Windows Notepad.

II.  Install  the FASCGI Module

  1. Open the Windows Control Panel.
  2. Double-click Programs and Features.
  3. Click Turn Windows features on and off.
  4. Expand the Roles node in the tree.
  5. Select the Web Server (IIS) role.
  6. Click Add Role Services in the Role Services section at the bottom of the page.
  7. Select the CGI option.
  8. Click the Next button.
  9. Click the Install button to begin the installation.

III.  Create the PHP / FastCGI handler mapping using the IIS Manager

  1. Open the IIS Administration tool by clicking Start, then Run, then enter Inetmgr.exe and click OK.
  2. Select the server node in the tree view.
  3. Double-click the Handler Mappings feature in the main panel.
    At this point, you will see a list of existing handler mappings for the server, which define the extensions that the server knows how to process, and what handler components are responsible for processing them. For example, the *.asp extension will be mapped to the "IsapiModule", which enables the ASP.dll ISAPI extension to process ASP scripts.
  4. Click Add Module Mapping in the Actions pane to create a new handler mapping for *.PHP for the FastCGI module.
  5. Set request path to "*.PHP", Select the "FastCGIModule" in the dropdown box, and set the executable field to the path to the PHP-CGI.EXE executable, which provides the FastCGI gateway to the PHP scripting engine in your PHP distribution.
  6. When you press OK, you will be prompted with a dialog box asking whether you would also like to create a FastCGI application pool for "c:\php\php-cgi.exe". Click Yes. This will automatically create the configuration for running the specified PHP-CGI.EXE application, which is required for each FastCGI application.

That's ALL!

Published Friday, October 26, 2007 9:05 PM by caneja
Filed under:

Comments

# Setting up Ruby on Rails with IIS 7.0 and Vista SP1

Monday, March 31, 2008 8:26 AM by Dave's Team System Blog

I have an interoperability demo that I'm working on, so I'm setting up Ruby so that I can connect via

Powered by Community Server (Non-Commercial Edition), by Telligent Systems