Many developers prefer to have a WAMP (Windows-Apache-MySQL-PHP) environment due to the obiquitous nature of Windows platform. A number of ready-made packages are available that can be used to dump a working PHP development environment on Windows environment with a few clicks. The major ones are phpdev and XAMPP, etc.. However, any hardcore PHP programmer would like to setup his/her development environment from scratch with the individual latest releases of PHP, MySQL and Apache for flexibility and scalability.
Please find the step-wise instructions to setup PHP development environment on Microsoft Windows Vista below. If you want to install the same on Windows XP, please refer to our other blog – Setup PHP Development Environment on Windows XP PC.
- Installing of Apache Web Server
- Configuring Apache
- Installing MySQL
- Installing PHP
- Configuring PHP
- Installing PHPMyAdmin
- Configuring PHPMyAdmin
Installing Apache Web Server

Figure: 1

Figure: 2

Figure: 3

Figure: 4

Figure: 5

Figure: 6

Figure: 7
- Download Apache HTTP Server 2.2 from
http://archive.apache.org/dist/httpd/binaries/win32/ pick the latest versions in .msi file format. Or, download Apache HTTP Server 2.2.2 from
http://archive.apache.org/dist/httpd/binaries/win32/apache_2.2.2-win32-x86-no_ssl.msi directly. - Save the file and rename it to apache.msi
- Run the command prompt in Administrator mode by clicking on Start->All Programs->Accessories->Command Prompt and right click to“Run as administrator”. (Figure: 1)
- Change your current directory to the directory, where apache.msi is saved (by CD command)
- Type the command: msiexec /i apache.msi and press Enter. (Figure: 2)
- This starts the installation of Apache Web server.
- Step I: Click Next (Figure: 3)
- Step II: Select “I accept the terms in the license agreement” and click Next. (Figure: 4)
- Step III: Enter server information and click Next (Figure: 5)
- Step IV: Select setup type and click Next (Figure: 6)
- Step V: Select folder to install and click Next (Figure: 7)
- Step VI: Click Install to begin installation (Figure: 8 )
- Step VII: Click Finish to exit the wizard (Figure: 9)
Configuring Apache
- Under “C:\Program Files\Apache Software Foundation\Apache2.2\conf” open httpd file (text document) using an ASCII text editor such as Notepad .
- In line no. 149, change DocumentRoot “” to DocumentRoot “your directory”, the directory out of which you will serve your documents. E.g.- DocumentRoot “C: /project/”.
- In line no. 177, change Directory “” to Directory “directory already set in DocumentRoot”.E.g.- Directory “C: /project/”.
- Add the following code at the end of the file
LoadFile “C:/php/php5ts.dll”.
LoadModule php5_module “C:/php/php5apache2_2.dll”.
PHPIniDir “C:/php”.
AddType text/html .php .phps.
AddHandler application/x-httpd-php .php.
AddHandler application/x-httpd-php-source .phps. - In line no. 212, add
DirectoryIndex index.html index.php
to make sure that index.php or index.html will be picked up automatically by
the server at start-up.
Installing MySQL

Figure: 10

Figure: 11

Figure: 12

Figure: 13

Figure: 14

Figure: 15

Figure: 16

Figure: 17

Figure: 18

Figure: 19

Figure: 20

Figure: 21

Figure: 22

Figure: 23

Figure: 24

Figure: 25
- Step I: Click Next. (Figure: 10)
- Step II: Select Setup Type and click Next an (Figure: 11)
- Step III: Click Install (Figure: 12)
- Step IV: Select account type (Figure: 13)
- Step V: Click Finish to exit and select Configure the ySQL Server now to configure MySQL. (Figure: 14)
- Step VI: Click Next to continue (Figure: 15)
- Step VII: Select configuration type and click Next to continue (Figure: 16)
- Step VIII: Select server type and click Next to continue (Figure: 17)
- Step IX: Select database usage (Figure: 18)
- Step X: Choose the drive and directory for the nnoDB datafile and click Next to continue. (Figure: 19)
- Step XI: Set the approximate number of concurrent connections to the server and click Next to continue (Figure: 20)
- Step XII: Set the networking options and click Next (Figure: 21)
- Step XIII: Select the default harset and click Next. (Figure: 22)
- Step XIV: Set the Windows options and click Next (Figure: 23)
- Step XV: Enter the root password and click Next (Figure: 24)
- Step XVI: Click Finish to close the Wizard (Figure: 25)
Installing PHP
- Download PHP from http://www.php.net/downloads.php
- Create a directory php on your computer under “C:\”.
- Unzip the downloaded contents and put it all in “C:\php”
Configuring PHP
- After the contents have been unzipped,Copy php5apache2.dll, php5ts.dll and libmysql.dll (available under “C:\php”) into your
“C:\WINDOWS\system”. - Copy php5ts.dll (available under “C:\php”) into your “C:\WINDOWS”.
- Copy php.ini-recommended (available under “C:\php”) into the same directory.Open this copied file click Save As php.ini.
- Open the php.ini using Notepad:-
- In line no. 513, change doc_root = to doc_root = “your directory”, the directory out of which you will serve your PHP pages. E.g.:- doc_root = “c:\project”
- In line no. 520, change extension_dir = to extension_dir = “C:\php\ext”, the directory in which the loadable extensions (modules) reside. E.g:- extension_dir = “C:\php\ext”
- In line no. 651, uncomment extension=php_mysql.dll.
Installing PHPMyAdmin
- Download phpMyAdmin 2.11.8.1 from
http://www.phpmyadmin.net/home_page/index.php - Create a directory phpMyAdmin in your root directory.
E.g:-C:/project/phpMyAdmin, here project is the root directory. - Unzip the downloaded contents put it all in phpMyAdmin directory.
Configuring phpMyAdmin
- Under phpMyAdmin folder open config.inc.php file using an ASCII text editor such as Notepad.
- In line no. 36, change $cfg[’PmaAbsoluteUri’] = ‘’; to $cfg[’PmaAbsoluteUri’] = ‘http://localhost/phpMyAdmin/’;
- In line no. 75, change $cfg[’Servers’][$i][’password’]= ‘’; to $cfg[’Servers’][$i][’password’]= ‘Your Database Password’; i.e., MySQL password.
- Add “C:\Program Files\MySQL\MySQL Server 4.1\bin;C:\php” to the Variable value.
- Steps to go to Variable value :-
- Right click My Computer icon.
- Click Properties from the list shown.
- Click Advanced tab.
- Click Environment Variables.
- Click Path and then Edit under the list of System variables shown.
- Then add “C:\Program Files\MySQL\MySQL Server 4.1\bin;C:\php” in Variable value and click Ok.
Tags: Apache, MySQL, PHP, Windows Vista






Thanks I found just the info I already searched everywhere and just couldn’t find. What a perfect site.
Your the best!