Installing Apache 2.2.11, PHP 5.3 and MySQL 5.1.36 on Windows XP/Vista

August 31, 2009 at 1:46 pm Leave a comment

Installing Apache 2.2.11, PHP 5.3 and MySQL 5.1.36 on Windows XP/Vista

This tutorial shows you how to install and configure Apache 2.2.11 ,PHP 5.3 and MySQL 5.1.36 for Windows XP/Vista step by step .
The Tutorial is the modified version found at WebDevCodex. The screencast is also available.
Tools needed – All careware:
1. Apache HTTP Server (2.2.11)
Download Apache 2.2.11 (with no mod ssl) (169)
2. PHP 5.3 – Download PHP 5.3.0 (VC6 Thread safe)
3. MySQL 5.1.36

Before starting these downloads and install , be sure to turn off UAC (User Access Control) in Vista.
Downloads complete? Great. Now install Apache the PHP and then MySQL in that order.
Step 1 : Install Apache
1. First create a New Folder in C:\ and name it as server.
2. Launch the installation, agree to the terms in the license agreement .
3. In the Server Information dialog box, assign, and to Network Domain, Server Name and Admin’s email respectively.
4. Choose Custom Installation and specify the install path as C:\server\apache\
5. Once Installation is complete, verify your installation of Apache by opening http://localhost/ in your browser. It works? Great. We will configure Apache in the coming steps.
STEP 2 : Install & Configure PHP 5.3
1. Extract the PHP5.3 package
Open the zip file & Extract all your files to C:\server\php.
2. Navigate to C:\server\php
3. Rename php.ini- file
Search for the file, php.ini-development and rename it to php.ini
4. EDIT php.ini
Open up php.ini using Wordpad or Dreamweaver. There are 2 edits in this file
Edit 1
Find extension_dir = “./” and replace it with (Note the forward slashes)
extension_dir = “C:/server/php/ext”
Edit 2
Now in the following edit, you just have to uncomment (by removing the “; ”) from the extension to activate it. Semicolons are used to specify comments in the php.ini file.
Remove the semicolon in the following ;
Save the php.ini file and restart the apache server from Start->All Programs->Apache HTTP Server 2.2->Control Apache Server-> Restart
5. Adding PHP Environmental Variables in the System path
Navigate to Start->Control Panel->System->Advanced System Settings then go to the advanced tab, Click on the Environmental Variables button, then scroll down under system variables to find PATH, Edit it and add the following path, C:\server\php;
6. At this point you MUST reboot windows . REBOOT not Log Off. If you move on past that point without rebooting , apache won’t find MySQL extensions.

STEP 3 : Configure Apache 2.2.11
1. Now navigate to C:\server\Apache\conf\httpd
Edit httpd.conf
Open httpd.conf in Wordpad or Dreamweaver

Now roll up your sleeves!
Edit 1
Search for
#LoadModule rewrite_module modules/ and uncomment it.
That is, replace with
LoadModule rewrite_module modules/
Edit 2
Add the following below the previous edit
LoadModule php5_module “C:/server/php/php5apache2_2.dll”
PHPIniDir “C:/server/php”
Edit 3
Search for
AddType application/x-gzip .gz .tgz
Add the following below the searched line
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Edit 4
Search for
DirectoryIndex index.html
Replace with
x index.html index.htm index.php index.phps
Edit 5
Search for
SciptAlias /php/ and replace with
ScriptAlias /php/ “C:/server/php/”
Edit 6
Search for
#Include conf/extra/httpd-vhosts.conf
Replace with
Include conf/extra/httpd-vhosts.conf
2. Now navigate to C:\server\Apache\conf\extra
Edit httpd-vhosts.conf
3. Replace all the text inside with

DocumentRoot “C:/Server/www/”

AllowOverride All
Options Indexes FollowSymLinks
Order allow,deny
Allow from all

4. Restart the Apache Web server

Step 4 : Testing our Apache + PHP
1. Create Directories to store your web files

1. Inside the C:\server folder, create folder called www
2. inside C:\server\www\ create
3. and then finally create public_html folder inside your C:\server\www\\
Follow this structure C:\server\www\\public_html\
This is where you will be putting all your html and php scripts to be accessed by your webserver.
2. Create index.php
Open up notepad, type in the following code and save the file as index.php inside C\:server\www\\public_html\

Please specify the ALL Files type while saving the file as index.php
Launch a browser and enter in the URL, localhost/index.php
STEP 5 : Configuring MySQL5.1.36
1. Launch the MySQL installer.
2. Select the Typical set up type, click Next
3. Click Next after reviewing where you are installing
4. Skip the Sign-up.
5. On complete of MySQL,launch the MySQL Server Instance Config Wizard (from Start->All Programs->MySQL)
6. Just follow through with the defaults
Be sure to check the Include Bin Directory in Windows PATH
Specify Username as root and password as root . Root is the default user and his default password is root.
Then click Execute
7. Test MySQL along with Apache+PHP
Restart the webserver and launch http://localhost/index.php again
To verify whether MySQL5 has been installed, scroll down the page until you come across mysql & mysqli heading
mysql and mysqli are extensions for MySQL
8. There you go. You have Apache2.2.11, PHP5 and MySQL5 installed on your system.

Having any troubles, post them here. Godspeed!
Bamidele Muyiwa.


Entry filed under: Uncategorized. Tags: , , , .

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


August 2009

Most Recent Posts

%d bloggers like this: