sycamore leaf
ISU Home
Paul Asay at ISU Library

Upgrading PHP Versions on Windows Server 2008 and IIS

  1. Download latest zip file from http://windows.php.net/download/
    1. If you are using IIS use the Non-Thread Safe (NTS) version
  2. Also at the same site download and install the Vc11 or Vc9 Visual C++ Redistributable for Visual Studio (it won't work without it)
  3. Unzip the PHP download to whatever directory you want to run it from (c:\php or anywhere you like)
  4. Update the path to the new PHP directory in your Environment Variables (Control Panel, System, Advanced System Settings, Environment Variables, Path). Also if you have a PHPRC path in the same place update that as well
  5. Rename the php.ini-production file in the new PHP directory to php.ini
    1. (if you upgrading from an older version be careful to keep all the setting in the old php.ini to the new one)
    2. For running on IIS these must be set:
    3. cgi.force_redirect = 0
    4. cgi.fix_pathinfo = 1
    5. fastcgi.impersonate = 1
    6. See this website for details: http://www.iis.net/learn/application-frameworks/install-and-configure-php-applications-on-iis/using-fastcgi-to-host-php-applications-on-iis
  6. Uncomment any new extensions you want to use in the new php.ini. In my case I needed LDAP so I uncommented extension=php_ldap.dll
  7. In you website directory create a file called test.php and include this in it (then view it in a web browser)
  8.       
      
  9. Change IIS to point to the new version of PHP
    1. Open IIS Manager. At the server level, double-click Handler Mappings
    2. click on PHP_via_FastCGI then click Edit in the right column
    3. Change the path to the new PHP (if it contains spaces use double quotes around the path) click OK
    4. Where it asked Do you want to create a FastCGI application ... click Yes
    5. fastcgi.impersonate = 1
  10. Restart you server
  11. Now open the file you created in step 7 in a web browser and see that the newer version should now be working