Manual WAMP Server Install
Learn how to manually install a WAMP server (Apache, MySQL, PHP, Perl, & Imagemagick)

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. which aren’t available on linux/unix servers. 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. If you want to use the latest version of ActivePerl then you have to find the version of ImageMagick that is compatible with it. And sometimes you may be forced to use an earlier version of ActivePerl because ImageMagick’s latest version isn’t compatible with ActivePerl’s latest version.

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. Otherwise, you will probably spend hours attempting to locate compatible versions between all the components.

STEP 1: INSTALL PERL

Install activestate perl ActivePerl-5.10.1.1006-MSWin32-x86-291086.msi. (24-Aug-2009)
Be sure to install into c:\usr instead of c:\perl. Then 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.

Reboot so that Step 2 will work smoothly.

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.5.0-5-Q8-windows-dll.exe (19-March-2009)
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.
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 MYSQL

Install MySQL server mysql-essential-5.0.85-win32.msi (11 August 2009).

Uninstall any existing MySQL installation and delete the mysql folder to avoid problems with previous root password.

- Select typical install
- Check configure mysql server
- Select standard configuration
- Install as windows service
- Check include bin directory in windows path
- Check “modify security settings”
- Set root password = monkey
(if your WAMP server will be a public server then choose a more secure password)
- Execute

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

STEP 4: INSTALL MYSQL TOOLS

Install MySQL GUI tools mysql-gui-tools-5.0-r17-win32.msi
Install MySQL workbench tools mysql-workbench-oss-5.1.18a-win32.msi

STEP 5: 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 6: CREATE TEST TABLE

If you disabled “launch mysql server” during installation of the MySQL server above, then manually start the MySQL service.

- run services.msc
- start MySQL service

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

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

Click Catalogs
Right click and select “create new schema” and enter database schema name “mydb”.
Create a table=table1, column=name, datatype=varchar(20).

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

Select schema privileges tab and assign privileges for user alan to schema mydb.

Which database table engine should I use? InnoDB or MyISAM? MyISAM is faster than InnoDB. The main advantage InnoDB has over MyISAM is that it supports row locking, while MyISAM only supports table locking. Therefore, if lots of reads and writes are constantly being done to a very large table, InnoDB eliminates the constant database errors that using a MyISAM table would cause from the overload. Note: you can have InnoDB and MyISAM tables under the same schema and you can convert tables between the 2 formats.

STEP 7: TEST MYSQL

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

STEP 8: INSTALL PHP

Download PHP php-5.2.10-Win32-VC6-x86.zip (17 June 2009)

Unzip 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 and such.

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 9: 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\Apache2.2\ (not necessary, but it’s less obscure)

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.

Download httpd.conf to C:\Program Files\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
#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 10: TEST PHP

Validate the PHP installation and proper connection to MySQL.

Download http://panofish.net/download/php_test.zip and unzip the 2 PHP files 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 11: INSTALL PHPMYADMIN

Download phpMyAdmin-3.2.1.zip (09 Aug 2009).
Unzip the files 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 the MySQL adminstrator tool and assign necessary privileges.

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

STEP 12: 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. Shahid
    July 29th, 2010 at 07:37 | #1

    That was a wonderful tutorial. Many thanks for a newbie like me….

  1. No trackbacks yet.
If you want a pic to show with your comment, get a gravatar!