Installing Apache, MySQL, PHP, and PHPAdmin on WindowsXP

From REM

Jump to: navigation, search

This file describes the process required to install Apache, MySQL, PHP, and phpMyAdmin on a personal computer. A pdf version is also available.

The system was a Sony VGN-A270P with WindowXP with SP2. At the time of installation, no other server software existed on the computer.


After the fact, I realized the website also has a tutorial for Apache2, PHP5, MySQL4, and phpMyAdmin. You may wish to use this tutorial as an alternate to the process described in this file. However, it appears the methodology for getting everything working together is different than the tutorial I used – you may have to hack a bit on the newer tutorial as well.

This website has an excellent tutorial and was the basis for my successful installation.


This tutorial was for Apache2, PHP4, MySQL4, and phpMyAdmin2.6. However, I installed Apache2, PHP5, MySQL5, and phpMyAdmin2.7. I did encounter some discrepancies, which are described below, but for the most part this tutorial works as is.


  1. Download the required software. The tutorial first guides you to download the required software packages (some are self-extracting, some are just collections of file – don’t worry, just download). Instead, I downloaded the latest Generally Available (GA) releases (as noted on the respective websites). I did not use nor suggest using beta releases.
    • Apache2
      • http://httpd.apache.org/download.cgi
      • Important: the desired file is “Win32 Binary (MSI Installer)” and not “Win32 Source”.
      • I downloaded version 2.0.55. At the time, 2.2.0 was not available for Windows.
    • MySQL 5.0.18
      • http://dev.mysql.com/downloads/mysql/5.0.html
      • Important: the desired file is “Window(x86)” and not “Windows Essentials(x86)”.
      • Note this is an installation zip file. Clicking on this will initiate a self-installation procedure.
    • MySQL PHP Connector
      • http://dev.mysql.com/downloads/connector/php/
      • Important: There are two connectors: “mysql” and “mysqli”. You need BOTH.
      • Important: There seems to be a small battle going on between MySQL and PHP developers – both offer a PHP-MySQL Connector. Use the MySQL version!!!!
      • Note this is a simple collection of dll files.
    • PHP 5
    • phpMyAdmin 2.7
  2. Install the required software. The tutorial will then take you through installation of each software package. The additional or different methods I used are listed below, otherwise the tutorial is successful.
    • Apache2
      • Tutorial recommends “Custom” installation in order to put into custom directories. I did the default and let the application create the default directory structure.
    • MySQL
      • Tutorial recommends “Custom” installation in order to put into custom directories. I did the default and let the application create the default directory structure.
    • MySQL PHP Connector
    • PHP 5
      • Tutorial recommends “Custom” installation in order to put into custom directories. I did the default and let the application create the default directory structure.
      • The tutorial says to add these lines to the Apache httd.conf file
        • ScriptAlias /php/ "c:/server/php/"
        • AddType application/x-httpd-php .php
        • Action application/x-httpd-php "/php/php.exe"
      • The new lines should be as follows. Notice the first and last lines are different. The first line is different because of (i). The last line is different because of the newer PHP version.
        • ScriptAlias /php/ "c:/php/"
        • AddType application/x-httpd-php .php
        • Action application/x-httpd-php "/php/php-cgi.exe"
    • phpMyAdmin
      • no changes for this section.