It all sounds Geek to me! [Gautam Arora]

Wednesday, August 10, 2005

HOWTO: Installation & Configuration of WAMP - Part 1

->WAMP:Windows Apache MySQL PHP

  • Apache Web Server Installation:
1.Get Apache Win32 Binary (MSI Installer)

2.The only info you need to fill during the installation wizard is:
For the rest of the screens, just click the next button.

3.Apache is installed at "C:\Program Files\Apache Group\Apache2"

  • Apache Web Server Configuration:
1.Stop Apache Server by double clicking the icon in the taskbar which displays the Apache Service Monitor and then clicking Stop.

2.Open "C:\Program Files\Apache Group\Apache2\conf\httpd.conf" using notepad.

#.Change DocumentRoot to DocumentRoot to DocumentRoot "C:\Program Files\Apache Group\Apache2\htdocs"

#.Change to

3.Change DirectoryIndex index.html index.html.var to DirectoryIndex index.html index.html.var index.php

4.Save the configuration file

5.Start Apache server using the Apache Service Monitor

  • Testing Apache Web Server:
Open your Internet Explorer/Mozilla Firefox and in the address bar type, 'http://localhost'

  • PHP Installation:
1.Get PHP 4.4.0 zip package

2.Unzip the file to 'C:\PHP\php-4.4.0-Win32'

3.Copy all 'dll' files from 'C:\PHP\php-4.4.0-Win32\dlls' to 'C:\PHP\php-4.4.0-Win32' i.e where file 'php4ts.dll' is located

4.Copy all 'dll' files from 'C:\PHP\php-4.4.0-Win32\extensions' to 'C:\PHP\php-4.4.0-Win32' i.e where file 'php4ts.dll' is located

5.Copy 'php.ini-dist' file from 'C:\PHP\php-4.4.0-Win32' file to 'C:\WINDOWS' and rename it to 'php.ini'

6.Edit 'php.ini file' and set 'doc_root' as doc_root = "C:\Program Files\Apache Group\Apache2\htdocs"

7.Edit 'php.ini file'and set 'user_dir' as user_dir = "C:\PHP\php-4.4.0-Win32"

8.Edit 'php.ini file'and set 'extension_dir'as extension_dir = "C:\PHP\php-4.4.0-Win32"

  • PHP Configuration with Apache:
1. To make PHP work with Apache, edit file 'C:\Program Files\Apache Group\Apache2\conf\httpd.conf' and set the following:

AddType application/x-tar .tgz
ScriptAlias /php/ "C:\PHP\php-4.4.0-Win32\"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php .php4
Action application/x-httpd-php "/php/php.exe"

2.Double click to start 'C:\PHP\php-4.4.0-Win32\php.exe' to make sure PHP starts.

3.Also restart Apache

4. To test if PHP works with Apache, make a file with the following content:

echo "Hello!";

and save it as 'test.php' under web document root directory which is at 'C:\Program Files\Apache Group\Apache2\htdocs'

  • Testing PHP on Apache Web Server:
Now go to Internet Explorer and open 'http://localhost/test.php'. You should see 'Hello!' on the page.

This concludes Part 1 of the WAMP HOWTO.
Part 2 will cover MySql installation and more ...

Note: This article is an updated version of the original WAMP article By NORBU (
Please leave your comments if you faced any problems or tips to improve this howto.


rajeev chhajer said...

hey gautam,

i really feel elated after installing the im inspired to install the java web server...nevertheless pls keep putting up tuts like these on your blog...its very easy to comprehend and implement too...keep adding data to the knowledge pool...


ps:now im a part of the open source family too...

Hrishikesh said...

Another d00d inspired... Good for you! ;-P

Amit Bhan said... thanks for telling me all this. But! i got a question for you.

1) Installation is simple. But why do we need to make those 2 changes to our configuration file? After installing apache from the .msi package, it started by default. And then when i tested it by going to http://localhost, it successfully generated that page. Then whats the need for the changes?

Or are they required for unpacking the PHP package so that it could run together with windows and apache?

Did i just answer my question? HAHAHA, i cant help it. I had to ask!!! anyways, check me out on!! no need to go now, there is absolutely nothing there. But after i kick your butt in squash tomorrow, i'll have plenty.

Nice blogs!!!