How to Build a WAMP Server
Fully Customizable Manual Installation

Instructions

This is the best WAMP installation guide on the net.
If you follow these notes, you will have a WAMP server running in the shortest time possible.

What is a WAMP server?
It’s a web server running on windows which uses at least 4 components.

  1. Windows
  2. Apache
  3. MySQL
  4. PHP, Perl, Python

A Linux based web server is called a LAMP server.
Except for the windows operating system, all of the components of a WAMP server are free (open source).
Although it can be used as a production server, a WAMP server is typically used as a development server.
A WAMP server is the best possible development platform for web applications.
You don’t have to keep synchronizing (ftp-ing) to a separate machine to test each code change.
You have ready access to the greatest diversity of support applications such as photoshop, flash authoring, … etc.
A WAMP server offers the greatest degree of Rapid Application Development.

These instructions are NOT for installing a packaged WAMP server.
If you want to install a WAMP server manually, then you’ve come to the right place.
The main advantage of a manual installation is greater flexibility.
You can create a server which is tailored to your requirements.
For example, the following instructions also include Perl and ImageMagick.

The trickiest part of a manual installation is making sure your components are compatible versions.
For example, not all versions of ActivePerl will work with a particular version of ImageMagick.

Fortunately, I have already done the hard part and determined the most recent compatible versions for a WAMP server.
To save yourself time and headache, I recommend that you use the versions I indicate.

All of the packages necessary to complete this installation are available in the following zip file:

WAMP-Files.zip

STEP 1: INSTALL PERL

Install activestate perl ActivePerl-5.14.2.1402-MSWin32-x86-295342.msi. (7-Oct-2011)

Be sure to install into c:\usr instead of c:\perl.
That way, you won’t have to change the top of perl programs from the linux standard value of #!/usr/bin/perl.
And your perl programs will easily migrate between linux and windows.

You can find the latest version at http://www.activestate.com/activeperl, but I recommend you use the version above.

STEP 2: INSTALL IMAGEMAGICK

Install ImageMagick ImageMagick-6.7.3-4-Q8-windows-dll.exe (12-Sept-2011).

Be sure to check the perlmagick option.
The dll version is a better choice than the static imagemagick.
The Q8 version of ImageMagick is twice as fast as Q16 and is good for web images.
You may have to reboot for changes to take effect.
Find all versions at http://image_magick.veidrodis.com/image_magick/binaries/.

STEP 3: TEST PERL & IMAGEMAGICK

Confirm your installation of ActivePerl & ImageMagick by running test_imagemagick.pl.

STEP 4: Install .NET

Install .NET Framework 4.0 dotNetFx40_Full_x86_x64.exe
This is needed for installing mysql in the next step.
Find at http://www.microsoft.com/download/en/confirmation.aspx?id=17718

STEP 5: Install C++ Runtime

Install Microsoft Visual C++ 2010 32-bit runtime vcredist_x86.exe
This is needed for mysql install in the next step.
Find at http://www.microsoft.com/download/en/details.aspx?id=5555

STEP 6: INSTALL MYSQL

Install MySQL server mysql-installer-5.5.17.0.msi (24 Oct 2011).
Uninstall any existing MySQL installation and delete the mysql folder to avoid problems with previous root password.

  • skip check for updates
  • full install
  • server machine for work and developer machine for home
  • Set root password = monkey (if your WAMP server will be a public server then choose a more secure password)

You can find the latest MySQL binaries at http://dev.mysql.com/downloads

fyi: I removed the default anonymous user account, otherwise attempting to connect to localhost may fail for other user accounts.

STEP 7: INSTALL PERL MYSQL MODULE

Install perl DBD-mysql module with perl package manager (under activestate program group).
Be sure to click “view all packages” (not just installed packages) when searching for DBD-mysql.

STEP 8: CREATE TEST TABLE

Now we need to setup a simple schema and table so that we can test our installation.
Run MySQL Workbench.

server host = localhost
username = root
password = monkey (or whatever password you chose during MySQL installation)

Create new schema name “mydb”.
Create a table=table1, column=name, datatype=varchar(20).

Add a user with username=alan and password=please (under user administration).

Assign privileges for user alan to schema mydb.

Which database table engine should I use? InnoDB or MyISAM?
MyISAM is faster than InnoDB.
MyISAM only supports table locking.
InnoDB supports row locking.
Therefore, InnoDB eliminates database errors caused by concurrent access.

Note: you can mix InnoDB and MyISAM tables under the same schema AND you can readily convert tables between the 2 formats.

STEP 9: TEST MYSQL

Confirm MySQL is installed properly by running test_mysql.pl.
It inserts a record into table1 and reads it back.

STEP 10: INSTALL PHP

Unzip php-5.2.10-Win32-VC6-x86.zip (17 June 2009) the files to a folder at c:\php

I have already updated the php.ini file. This table shows you the changes that I made.
If you download a newer version of PHP then you will need to make the same changes so that MySQL extensions can be found.

php.ini-recommended php.ini
display_errors = Off display_errors = On
extension_dir = “./” extension_dir = “c:\php\ext”
upload_max_filesize = 2M upload_max_filesize = 30M
;extension=php_mbstring.dll extension=php_mbstring.dll
;extension=php_mcrypt.dll extension=php_mcrypt.dll
;extension=php_mysql.dll extension=php_mysql.dll
;extension=php_mysqli.dll extension=php_mysqli.dll

Add “;C:\php;C:\php\ext” to the windows path
OR if your a real geek you can use the perl package manager (under the ActivePerl program group)
to install the Win32-Env module and then run update_path.pl.

In either case, you need to reboot to have the change take effect.

The latest version of PHP can be found at http://windows.php.net/download.

STEP 11: INSTALL APACHE

Install Apache win32 apache_2.2.11-win32-x86-openssl-0.9.8i.msi (05 March 2009).
(I chose the version that includes openssl encryption, just in case I’d need it).

Network Domain: localhost
Server Name: localhost
Admin Email: your@email.com

Change install folder to C:\Program Files(x86)\Apache2.2\ (not necessary, but it’s less obscure)

If apache won’t start because of a conflict with port 80, it may be due to skype.
If you have skype running you can’t start apache on 80. Just stop skype, then start apache and then start Skype (it only blocks 80 if it is already free).

Open your browser and go to http://localhost/ and you should see “It works!”
You can also use your machines ip address like this http://192.168.1.119/ or http://127.0.0.1/ and get the same result.

Copy httpd.conf to C:\Program Files(x86)\Apache2.2\conf\ (or where your apache install is located).
Modify all “Program Files” references in httpd.conf to point to your apache install location.

These are the differences between the original httpd.conf and the one I had you replace it with:

http.conf (original) http.conf (my modifications)
Loadfile “C:/php/php5ts.dll”
LoadModule php5_module “C:/php/php5apache2_2.dll”
PHPIniDir “C:/php”
DocumentRoot “C:/Program Files (x86)/Apache2.2/htdocs” DocumentRoot “C:/www”
<Directory “C:/Program Files (x86)/Apache2.2/htdocs”> <Directory “C:/www”>
Options Indexes FollowSymLinks Options Indexes FollowSymLinks ExecCGI
DirectoryIndex index.html DirectoryIndex index.html index.cgi index.pl index.php
ScriptAlias /cgi-bin/ “C:/Program Files (x86)/Apache2.2/cgi-bin/” ScriptAlias /cgi-bin/ “C:/Program Files (x86)/Apache Software
Foundation/Apache2.2/cgi-bin/”
#AddHandler cgi-script .cgi AddHandler cgi-script .cgi .pl
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php-source .phps

Create c:\www folder (this is your server root).

Stop and start the apache server (look in the windows system tray for the apache server icon).
If apache fails to start, make sure the “program file” paths are correct in the httpd.conf file.
You can also check the apache error logs for messages.

You can find the latest apache binaries at http://httpd.apache.org/download.cgi.

STEP 12: TEST PHP

Validate the PHP installation and proper connection to MySQL.

Create folder c:\www.  Unzip php_test.zip to c:\www.
Open your browser to http://localhost/info.php
You should see the php info web page output with tons of detail on you PHP installation.

If the web page doesn’t appear, try rebooting to ensure all of the installs and changes have taken effect.
Also, check that the Apache server and MySQL server are running.

Go to http://localhost/mysql_test.php
You should see the output from mysql table1 (created above).

STEP 13: INSTALL PHPMYADMIN

Unzip phpMyAdmin-3.2.1.zip (09 Aug 2009) to a folder at c:/www/phpMyAdmin.

FYI: the config.inc.php file located in phpMyAdmin is already modified as needed
(it has the mysql root password set to monkey per above mysql notes).

Open your browser to http://localhost/phpMyAdmin.
You need to add a valid user and password using MySQL workbench and assign necessary privileges.

You can find the latest phpMyAdmin files at
http://www.phpmyadmin.net/home_page/downloads.php

STEP 14: YOUR DONE!

Your WAMP server is now ready for Perl, PHP, MySQL web development!
Please comment and provide feedback on this post. THANKS.

Comments

  1. December 20th, 2011 at 01:44 | #1

    Hi,
    Thank you for your nice information. I like your article.
    Thanks.

  2. David Brown
    January 2nd, 2012 at 22:03 | #2

    Are these instructions for Windows 7 64? If so, the instructions should indicate that it is for 64 bit Windows, not 32 bit Windows.

  3. David Brown
    January 2nd, 2012 at 22:03 | #3

    By the way, excellent set of instructions!

  4. January 7th, 2012 at 09:46 | #4

    Excelent.!!!

  5. KimWill
    June 11th, 2012 at 18:31 | #5

    Sir,
    I am attempting to roll-back a LAMP server to Apache 2.0, MySQL 5.0, and PHP 4.9. and put it on a WiinXP laptop. Thank you for posting thiese instructions… Do you think they will work on an older WAMP config?

    I inherited about 12K lines of code originally developed on FreeBSD and moved to CentOS.
    Currently, PHP 5.5 does not seem to add/subtract the two places to the right of a decimal point well. I suspect a few years of auto-updates need to be removed so I can bring it up-to-date.

    Thanks.

  6. June 11th, 2012 at 18:59 | #6

    The variations are numerous. It may work, but I can only assure you that if you follow these instructions … you will have a fully functional WAMP server. In fact I have retested these instructions multiple times on both xp and windows 7… and they work every time!

  7. March 7th, 2013 at 11:54 | #7

    Would you consider this “secure” for production use?

  8. March 7th, 2013 at 12:02 | #8

    I would consider this secure for production use… just make sure you choose a proper root password during installation.
    This is a typical WAMP installation setup used on many production servers. This is just a documented procedure and is not related to the WAMP branded package.

  9. February 9th, 2014 at 19:04 | #9

    Add your blog to Blogger’s listings to increase your online visibility.
    There are several best practices for corporate leader blogs, which can inspire
    employees to aim for bigger and better goals collectively.

  10. March 13th, 2015 at 13:18 | #10

    I hate installing things. Shame this isn’t portable.

  11. March 10th, 2016 at 14:05 | #11

    After i did all this installation, what i found out was apache server was not running. When i took mouse pointer to tray icon of wamp, it said one of two services running . Plz can anybody help?

  1. November 27th, 2011 at 00:51 | #1
If you want a pic to show with your comment, get a gravatar!