Setup PHP Development Environment on Microsoft Windows Vista

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.

  1. Installing of Apache Web Server
  2. Configuring Apache
  3. Installing MySQL
  4. Installing PHP
  5. Configuring PHP
  6. Installing PHPMyAdmin
  7. Configuring PHPMyAdmin

Installing Apache Web Server

Run as Administrator
Figure: 1
comandline
Figure: 2
Apache Step 1
Figure: 3
Apache Step 2
Figure: 4
Apache Step 3
Figure: 5
Apache Step 4
Figure: 6
Apache Step 5
Figure: 7
  1. 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.
  2. Save the file and rename it to apache.msi
  3. 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)
  4. Change your current directory to the directory, where apache.msi is saved (by CD command)
  5. Type the command: msiexec /i apache.msi and press Enter. (Figure: 2)
  6. 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

  1. 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

Step 1 MySQL
Figure: 10
Step 2 MySQL
Figure: 11
Step 3 MySQL
Figure: 12
Step 4 MySQL
Figure: 13
Step 5 MySQL
Figure: 14
Step 6 MySQL
Figure: 15
Step 7 MySQL
Figure: 16
Step 8 MySQL
Figure: 17
Step 9 MySQL
Figure: 18
Step 10 MySQL
Figure: 19
Step 11 MySQL
Figure: 20
Step 12 MySQL
Figure: 21
Step 13 MySQL
Figure: 22
Step 14 MySQL
Figure: 23
Step 15 MySQL
Figure: 24
Step 16 MySQL
Figure: 25
  1. Step I: Click Next. (Figure: 10)
  2. Step II: Select Setup Type and click Next an (Figure: 11)
  3. Step III: Click Install (Figure: 12)
  4. Step IV: Select account type (Figure: 13)
  5. Step V: Click Finish to exit and select Configure the ySQL Server now to configure MySQL. (Figure: 14)
  6. Step VI: Click Next to continue (Figure: 15)
  7. Step VII: Select configuration type and click Next to continue (Figure: 16)
  8. Step VIII: Select server type and click Next to continue (Figure: 17)
  9. Step IX: Select database usage (Figure: 18)
  10. Step X: Choose the drive and directory for the nnoDB datafile and click Next to continue. (Figure: 19)
  11. Step XI: Set the approximate number of concurrent connections to the server and click Next to continue (Figure: 20)
  12. Step XII: Set the networking options and click Next (Figure: 21)
  13. Step XIII: Select the default harset and click Next. (Figure: 22)
  14. Step XIV: Set the Windows options and click Next (Figure: 23)
  15. Step XV: Enter the root password and click Next (Figure: 24)
  16. Step XVI: Click Finish to close the Wizard (Figure: 25)

Installing PHP

  1. Download PHP from http://www.php.net/downloads.php
  2. Create a directory php on your computer under “C:\”.
  3. Unzip the downloaded contents and put it all in “C:\php”

Configuring PHP

  1. After the contents have been unzipped,Copy php5apache2.dll, php5ts.dll and libmysql.dll (available under “C:\php”) into your
    “C:\WINDOWS\system”.
  2. Copy php5ts.dll (available under “C:\php”) into your “C:\WINDOWS”.
  3. Copy php.ini-recommended (available under “C:\php”) into the same directory.Open this copied file click Save As php.ini.
  4. 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

  1. Download phpMyAdmin 2.11.8.1 from
    http://www.phpmyadmin.net/home_page/index.php
  2. Create a directory phpMyAdmin in your root directory.
    E.g:-C:/project/phpMyAdmin, here project is the root directory.
  3. Unzip the downloaded contents put it all in phpMyAdmin directory.

Configuring phpMyAdmin

  1. 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: , , ,

2 Responses to “Setup PHP Development Environment on Microsoft Windows Vista”

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

Leave a Reply

Recent Comments

  • Stanford Reach: Great post. Thanks!
  • Shu Crunk: I was simply browsing for useful blog articles intended for a project research and I happened to stumble...
  • Marya: Hey rather wonderful weblog!! I’ll bookmark your weblog and grab the feeds conjointly…
  • John Vay: ive just started my own hosting company its such hard work haha :P
  • write a good resume: Your the best!