Top

Install php 5.x in Windows IIS

June 8, 2008

Although php works perfect in Linux, for a lot of people, developing or debugging the php program in their Windows PC or Laptop is still something making sense, at least for me.

Below is a guide about how to install php 5.x in IIS in case you have the same needs as me.

  1. First, you need to go to http://www.php.net/downloads.php to download the installation package you will need. Usually, it’s a Zip package.
  2. Unzip the .zip file to a folder you want, we assume it’s c:\php in below case.
  3. Add “;c:\php;c:\php\ext” to the end of environment variable “PATH”.
  4. Rename php.ini-recommended in c:\php to php.ini.
  5. Open php.ini and make below changes:
    • set extenseion_dir to “c:\php\ext”, such as extension_dir = “c:\php\ext”
    • Remove ‘;’ before below 3 items:
      extension=php_mbstring.dll
      extension=php_gd2.dll
      extension=php_mysql.dll
  6. In IIS service, web site (Default Web Site)
    • Right click the web site, and select “Property”.
    • In “Home Directory” tab -> “Configuration …” Button -> “Add” Button to add Application Extension Mapping. Below is what we need to input:
      Execuation: C:\php\php5isapi.dll
      Extension: .php
    • In “ISAPI Filter” tab -> “Add” button to add new filter properties as
      Execuation: C:\php\php5isapi.dll
      Extension: php
  7. Restart IIS

Comments

Got something to say?





Bottom