How to install Apache, PHP and MySQL on Windows



  1. Installing Apache
    1. Obtain a copy of the Apache 1.3.28 Windows Installer from
    2. Run the installer.
      1. Install into C:\Apache
      2. Start the server
        • Start Menu>All Programs>Apache HTTP Server>Control Apache Server>Start
      3. Point the browser to http://localhost
        • You should see the Apache default page!
  2. Installing PHP
    1. Obtain a copy of the latest PHP Windows installer from
    2. Unzip the file
      • Install into C:\php
    3. Place php.ini into C:\WINDOWS
    4. Copy php4ts.dll and php4ts.lib into C:\php\sapi
  3. Configure Apache
    1. Using a text editor open the Apache configuration file
      • Should be C:\Apache\Apache\conf\httpd.con
    2. Set Apache variables
      1. Set the webmaster email
        • roughly line 283
      2. Change the root directory to what you wish (roughly line 309)
        • i.e. C:\C:\Documents and Settings\{username}\My Documents\Sites
      1. Change the Directory path for the default Web directory to the same path as the previous step
        • roughly line 334
    1. To have Apache load PHP add the following lines after the Loading and Adding of the other Modules (around line 241)

      #Load PHP!
      LoadModule php4_module c:/php/sapi/php4apache.dll
      AddType application/x-httpd-php .php .php4 .php3 .phtml
    2. To have Apache recognize index.php as a home page locate the following roughly line(392):

      <IfModule mod_dir.c>
      DirectoryIndex index.html

      and change to:

      <IfModule mod_dir.c>
      DirectoryIndex index.html index.php default.php

    3. Save and close the file
    4. Restart Apache
      • Start Menu>All Programs>Apache HTTP Server>Control Apache Server>Restart
  4. Install MySQL (coming soon...)
about mpf|sitemap|news| We choose no kin but adoted strangers.