戰地連結︰ Home My Flickr NBA.com About

2008年7月22日星期二

Installing PHP with FastCGI in Windows Server 2008 (IIS 7)

Overview

FastCGI can greatly improve the performance of CGI applications. I will share my experience of installing and configuring PHP 5.2.6 with FastCGI in Windows Server 2008 environment (the main difference is between IIS 7 and IIS 6).

Reference

Install PHP

Install IIS FastCGI

Steps

Install & Configure PHP

  1. Download PHP 5.2.6 form http://www.php.net/downloads.php
  2. Extract the ZIP file to C:\php
  3. Copy "php.ini-recommended" to the Windows directory (C:\Windows) and rename it to "php.ini"
  4. Open the "php.ini" and change the following settings"
    • extension_dir = "C:\php\extensions"
    • uncomment and set: cgi.force_redirect = 0
    • short_open_tag = On

Install & Configure IIS 7

  1. Add "Web Service" role at Windows Server 2008 "Server Manager" to install IIS 7.0
  2. Go to IIS Manager, select "Handler Mappings"
  3. Select "Add Module Mapping"
    • Input *.php in "Request Path"
    • Select "FastCgiModule" in "Module"
    • Input "C:\php\php.exe" in Executable
    • Input Name
  4. Press "OK"

沒有留言: