Installing PHP (5.3 currently) on Windows

Contents
Installing PHP
Installing Apache HTTP Server
Installing Internet Information Services

There is certainly a lot of different way to installing PHP or configuring it under different servers or platforms, most seasoned developers will probably have their own variations on it. This guide is going to cover but a few possible always of installing PHP using the author’s (of this guide) variation. Covers Apache using mod_php, Internet Information Services (IIS) 7 which is available on Windows Vista, Windows 7, and Windows Server 2008 using FastCGI. To a lesser extent in future revisions, IIS 5.1 included with Windows XP Professional, IIS 6 included with Windows Server 2003 will be added.

This guide does not cover MySQL. It might be added in future revisions, however, there are no plans.

Setting up the Environment


Having a good environment is a big plus to running a development server on your personal computer. While leaving the default settings for Apache and PHP, and saving the file you need in your Documents folder is perfectly fine. However, that seems all rather messy and inconvenient. This section of the guide is completely optional, giving a few pointers and ideas to create your own environment that suits you.

Having everything to do with the servers and your websites or projects under a single location can aid in backups and management. For example take this particular directory layout: (Aside from keeping Apache and PHP out of Program Files, keeps UAC prompts to a minimum during configuration.)
Code:
C:\Work
  |---projects
  |---websites
  |   \---sandbox
  \---workspace
      \---environment
          |---http-service
          \---language
              \---php
C:\Work\workspace\environment\http-service would hold Apache if you were going down that route. For this case sandbox referrers to the default localhost location a playground of sorts. Having configuration files for PHP and/or Apache here, instead of C:\Program Files lets you manage them without elevating an application (UAC) in Windows Vista or Windows 7. For this guide, the above directory structure will be used, except will be on its own drive (W: Drive).