WAMP Development Server
WAMP (Windows, Apache, Mysql, PHP)
1. Download and Install Apache http://httpd.apache.org (Version at time of writing 2.2.9)
The apache installation on windows is quite simple. Download the installer and follow the prompts. You really only have 1 screen to enter any information to.
Set up the first three boxes depending on your network. I recommend leaving the first radio button checked for port 80 as a service unless you have some other reason not to.
Don’t bother with configuring the http.conf file just yet, but you can open your browser and type http://localhost and you should see the message “It Works!” Congratulations, that was pretty easy. On to the next step.
2. Download and install PHP http://www.php.net (Version at time of writing 5.2.6)
Make sure you download the zip package and not the installer. I also suggest downloading the PECL win32 binaries as you do this which can be found on the same download page.
Create a new directory named php somewhere on your hard drive. In this case we will use C:\php. Extract the PHP zip into the new directory. Then extract the PECL zip into the C:\php\ext directory.
The next step will be to configure the php.ini file. You’ll find a file name php.ini-recommended in your php directory, rename this file to php.ini and open it will notepad.
There are only a few lines that will be changed with this guide. These are as follows:
Error Handling: Instead of outputting errors to the screen they will go to a log file. Make sure error reporting is set to E_ALL and display_errors is turned off. Log errors should be turned on. These are all set by default. You must change the following lines.
;error_log = filename error_log = “C:\php\error_log.txt”
;error_log = syslog error_log = syslog
Paths and Directories: There are a couple options that you must change in this section. Change the following lines to reflect our installation.
doc_root = doc_root = “C:\php”
extension_dir = “./” extension_dir = “C:\php\ext”
;upload_tmp_dir = upload_tmp_dir = “C:\php\uploads”
Don’t forget to create the upload directory if you change this location.
Extensions: There are many PHP extensions, but for this install we will only enable a couple of them. Uncomment the following lines to get the GD library and MYSQL/MYSQLI libraries.
extension=php_gd2.dll
extension=php_mysql.dll
extension=php_mysqli.dll
Mail function: There is a good chance you’ll need to send out some mail functions in your scripts so you need to have an smtp server set up. This will depend on your setup and if you have a server available.
SMTP =
smtp_port = 25
For out development machine, this is all we need to configure for now. You can read more about the php.ini file at http://us3.php.net/ini.core
One more thing we need to do is configure the windows PATH to include PHP. This can be done by right clicking on “My Computer” and selecting properties. Click the advanced tab and then Environment Variables. In the System Variables located the PATH and click edit. At the end you need to add ;C:\php;. You need to reboot for these changes to take effect.
3. Configure Apache for PHP
You’ll need to edit the http.conf file that apache comes with the get PHP working. There are only a few lines that we need to add/change. Before we do that, first create a directory in your C: drive. We’ll call it “www”. Back to the config file, at the top of the LoadModule lines, add the following:
LoadModule php5_module “C:\php\php5apache2_2.dll”
In the AddType section add:
AddType application/x-httpd-php .php
Add the following directory anywhere in the config file:
PHPIniDir “D:/Web/WebServer/PHP/”
Change Document Root from
DocumentRoot “C:/Program Files/Apache Software Foundation/Apache2.2/htdocs” To DocumentRoot “C:/www”
There is another directory line a little bit down that must also reflect the same path to C:\www.
There is one more line so that .php extensions work
DirectoryIndex index.html index.php
4. Create a test file with PHP.
Open notepad and create a file with
<?php phpinfo(); ?>
Save the file as test.php to the www directory. First make sure you restart apache and then open that file with your browser. You should see the php info screen. If not, something went wrong.
5. Download and Install MySQL and GUI tools http://www.mysql.com (Version at time of writing 5.0.51b)
Installing MySQL is pretty straightforward. Run the setup.exe from the downloaded installer and use a Typical Installation. Click next a couple times and then choose to configure now. From the next window select standard configuration. On the following window choose the following options:
Create a root password on the next screen and execute installation. That’s it, click finish. You may also want to install the GUI tools now.





