Installing Apache with PHP support
Last updated: Cuenca, 7 Dec 2008
 
To be able to view the website locally (on a system running Windows), here is how to install an Apache webserver with PHP support:
 
   1. Download the Apache Webserver and PHP
      The versions I used were:
       
                  apache_2.2.10-win32-x86-no_ssl.msi
                  php-5.2.6-win32-installer.msi
         
   2. Install Apache first
     a. Installation settings.. 
       - I used the following settings:
         
                   Network Domain: 127.0.0.1
                   Server Name:    127.0.0.1
                   Administrator's Email Address: I used my gmail address here
         
       - I took the defaults for the rest of the settings

     b. You shouldn't see any errors in the console window
        that pops up and when it finishes you should see:
        
        
     c. The installer appears to start the service so you should 
        then be able to go to localhost with your browser and see:
        
        
   3. Next install PHP
     a. Installation settings..
       - On the Webserver Setup page, select the version 
          that you are using.  I selected:
         
                   Apache 2.2.x Module
                  
       - On the next page, navigated to the Apache configuration 
         directory. Having selected the default location on Windows,
         
                   C:\Program Files\Apache Software Foundation\Apache2.2\conf\  
         
     b. You should see the following when the installer finishes:
        
             
     c. Then, using the tip on http://www.netadmintools.com/art525.html, 
        copy the following:
        
                   DirectoryIndex index.php index.html
                   <Files *.php>
                   SetOutputFilter PHP
                   SetInputFilter PHP
                   LimitRequestBody 10000000
                   </Files>
                   AddType application/x-httpd-php .php
                 
        to the Apache configuration file,
        
                   C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf 
     
     d. Stop and restart the Apache service.
     
     e. Put a .php file in the Apache htdocs directory, 
        
                   C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\
                   
        and view it in a browser. You should see the rendered PHP.
         
        e.g. I downloaded my website and put it in the Apache htdocs 
        directory and see:
        
        
        If you see just PHP script, then either you forgot to 
        stop/restart the Apache service or something may be 
        wrong with the Apache PHP configuration statements.
References:
  Installing Apache 2.2.x: http://www.ricocheting.com/server/apache.html
Installing PHP: http://php.net/