Configure FastCGI to Host PHP from IIS 5.x and 6.x

I want to tell everybody that I am back again after last post from Jan 2011. MGe is lost after the Celebrating the Chinese New Year(I am Chinese, πŸ™‚ ), and it is very sad that 2 relative passed away during the past week. πŸ™

Somehow, I will continue sharing my post from here, :-).

Today, I want to guide my reader on how to configure PHP FastCGI for IIS 5.x and 6.x.

i) IIS5.x or 6.x installed.
ii) PHP installed.

Install FastCGI extension,
1. Download the extension from
2. Install it and you will see it is installed to C:\Windows\System32\inetsrv folder.

Apply FastCGI extension,
i) Configure through command,
Run the follow command,

cscript fcgiconfig.js -add -section:"PHP" -extension:php -path:"C:\PHP\php-cgi.exe"

ii) Manually Configure it.
1) Run inetmgr.
2) Right click Web Site and select properties.
3) Click on Home Directory tab.
4) Click on the Configure button.
5) Click on the Add button.
6) In the “Add/Edit Application Extension Mapping”, add the following information,
Executable: C:\Windows\System32\inetsrv\fcgiext.dll
Extension: .php
Verbs: Limit to GET, HEAD, POST
7) Click OK.

Modify the fcgiext.ini file,
1) Add the following information to the fcgiext.ini file,

Set the optimal setting for FastCGI,
Set the following value to php.ini,
fastcgi.impersonate = 1
cgi.fix_pathinfo = 1
cgi.force_redirect = 0

Set the following value to fcgiext.ini, run the following script.

cscript fcgiconfig.js -set -section:"PHP" -EnvironmentVars:PHP_FCGI_MAX_REQUESTS:10000

IIS7 PHP Manager 1.0 stable version

If you read my earlier article here, you should know IIS got PHP Manager and it is now come with Stable version 1.0.

We should thank toΒ  RuslanY, who designed the IIS PHP Manager.

PHP Manager 1.0 can be used to:

  • Register PHP with IIS;
  • Validate and properly configure existing PHP installations;
  • Run multiple PHP versions side by side on the same server and even within the same web site;
  • Check PHP runtime configuration and environment (output of phpinfo() function);
  • Configure various PHP settings;
  • Enable or disable PHP extensions;
  • Remotely manage PHP configuration in php.ini file.

With stable version of IIS PHP Manager, you are actually able to view the recommendations and fix it within a second.

Below is the bug fixed and change since BETA version.

  • Support for running different PHP versions within the same web site;
  • Functionality to set IIS default document to index.php;
  • Links to quickly open php.ini file and PHP error log file;
  • Detection of PHP registered via CGI or ISAPI;
  • Detection of PHP that is registered by using command line arguments in IIS handler mapping.

IIS PHP Manager

1 week ago, IIS come out PHP Manager to allow IIS user to easily manage their PHP setting easily through IIS with interface.

For some reason, IIS PHP Manager only supported IIS7 and above but not lower version such as IIS6 as an extension of IIS7. Get your PHP Manager here.
IIS PHP Manager x86
IIS PHP Manager x64

Get your feature from your website.

With PHP Manager, you are able to do the following thing.

1. Change PHP Version.
2. Configure error_reporting easily.
3. Set runtime limits.
4. Manage all setting with GUI interface.
5. Enable extension easily.

With PHP Manager, you can easily change the PHP version as image above.

With PHP Manager, it allow you to enable the error log easily as well.

IIS 7.0 Administration Pack

I have not blog for a month :P. It was a very busy month for January(lazy for me, actually).

Today, got to share something with our friend again which known as IIS 7.0.Administration Pack and I will highlight the FastCGI Setting for IIS 7.0.

Normally, when you install PHP FastCGI with IIS 7.0, you will not have the UI(User Interface) setting from your IIS 7.0, but you may install IIS 7.0 Administration Pack to allow you IIS to show the setting from IIS.

Refer to the URL as below and choose the Administration pack which suite to your system.

Install it, and you are done.

Look to your IIS and select on the machine name, you shall get the FastCGI setting overthere.

Faster PHP in IIS

Did you know Microsoft and PHP have came out faster PHP with IIS named wincache(Windows Cache Extension) last week?

This means that you will no longer see PHP process keep used up your memory if you are using IIS Web Services anymore.

How to get wincache? It is very easy, make sure that you have PHP5.2 or PHP5.3 installed with your machine. Even you may install Microsoft Web Platform Installer from your Windows Server 2003 or Windows Server 2008 machine to install it.

For more information, you may refer to the URL below for more detail.

WinCache Extension 1.0 for PHP – Release to Web

You might ask what is the advantage with WinCache extension? IIS (Internet Information System) have listed Wincache could increase the PHP performance on Windows by caching bytecode in memory, reduce file system I/O used in memory, etc.