Developer Blog

Detailed Step-wise Instructions to Setup PHP Development Environment on Windows XP PC

Software must be installed in the following order:

  1. MySQL 4.1.22
  2. PHP 5.2.2
  3. Apache HTTP Server 2.2.2
  4. phpMyAdmin 2.6.4

Download MySQL 4.1.22 from http://dev.mysql.com/downloads/mysql/4.1.html#win32

Installing MySQL

Step I: Click Next

MySQL Installation

Step II: Select Setup Type and click Next

MySQL Installation

Step III: Click Install

MySQL Installation

Step IV: Select account type

MySQL Installation

Step V: Click Finish to exit and select Configure the MySQL Server now to configure MySQL

MySQL Installation

Step VI: Click Next to continue

MySQL Installation

Step VII: Select configuration type and click Next to continue

MySQL Installation

Step VIII: Select server type and click Next to continue

MySQL Installation

Step IX: Select database usage

MySQL Installation

Step X: Choose the drive and directory for the InnoDB datafile and click Next to continue

MySQL Installation

Step XI: Set the approximate number of concurrent connections to the server and click Next to continue

MySQL Installation

Step XII: Set the networking options and click Next

MySQL Installation

Step XIII: Select the default charset and click Next

MySQL Installation

Step XIV: Set the Windows options and click Next

MySQL Installation

Step XV: Enter the root password and click Next

MySQL Installation

Step XVI: Click Finish to close the Wizard

MySQL Installation

Download PHP 5.2.2 from http://www.php.net/downloads.php

Installing PHP

  1. Create a directory php on your computer under “C:\”
  2. Unzip the downloaded contents and put it all in “C:\php”

Configuring PHP

  1. After the contents have been unzipped,
    1. 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”
  2. Rename php.ini-recommended (available under “C:\php”) to php.ini and open it using an ASCII text editor such as Notepad
    1. In line no. 513, change doc_root = to doc_root = “your directory”, the directory out of which you will serve your PHP pages.
    2. In line no. 520, change extension_dir = to extension_dir = “C:\php\ext”, the directory in which the loadable extensions (modules) reside.
    3. In line no. 651, uncomment extension=php_mysql.dll

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

Installing Apache

Step I: Click Next

Apache Installation

Step II: Select “I accept the terms in the license agreement” and click Next

Apache Installation

Step III: Enter server information and click Next

Apache Installation

Step IV: Select setup type and click Next

Apache Installation

Step V: Select folder to install and click Next

Apache Installation

Step VI: Click Install to begin installation

Apache Installation

Step VII: Click Finish to exit the wizard

Apache Installation

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
    1. In line no. 149, change DocumentRoot “” to DocumentRoot “your directory”, the directory out of which you will serve your documents.
    2. In line no. 177, change Directory “” to Directory “directory already set in DocumentRoot”
    3. Add the following code at the end of the file
    4. 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

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

Download phpMyAdmin 2.6.4 from http://www.oldapps.com/download.php?oldappsid=phpMyAdmin-2.6.4-pl4.zip 

Installing phpMyAdmin

  1. Create a directory phpMyAdmin in your root directory
  2. 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.
    1. In line no. 36, change $cfg[’PmaAbsoluteUri’] = ‘’; to $cfg[’PmaAbsoluteUri’] = ‘http://localhost/phpMyAdmin/’;
    2. 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

  1. Right click My Computer icon
  2. Click Properties from the list shown
  3. Click Advanced tab
  4. Click Environment Variables
  5. Click Path and then Edit under the list of System variables shown
  6. Then add “C:\Program Files\MySQL\MySQL Server 4.1\bin;C:\php” in Variable value and click Ok

Before testing restart your computer. Create a PHP file with phpinfo(); as a function. Save the file as “phpinfo.php” into your root directory. Restart your Apache server so that it can read the new configuration directives you placed into httpd file (text document). Open your browser and type “http://localhost/phpinfo.php”. You should see information about your PHP setup.

Applications helpful to install are

  1. FF 2.0 .Download from http://www.firefox2.com/en/
  2. OpenOffice 2.2 .Download from http://download.openoffice.org/index.html
  3. FileZilla .Download from http://sourceforge.net/projects/filezilla/
  4. Putty SSH 0.59 .Download from http://www.softpedia.com/progDownload/PuTTY-Download-1001.html
  5. Crimson Editor 3.70 .Download from http://www.crimsoneditor.com/english/download.html

    2 Responses to “Detailed Step-wise Instructions to Setup PHP Development Environment on Windows XP PC”

    1. sanjay kohli Says:

      Configuring phpMyAdmin

      Under phpMyAdmin folder open config.inc.php file using an ASCII text editor such as Notepad.
      Where is this ??

    2. admin Says:

      You can find this file “config.inc.php” in the root folder of phpMyAdmin after uncompressing the application.

    Leave a Reply

    *
    To prove you're a person (not a spam script), type the security word shown in the picture.
    Anti-Spam Image



    Get Download Files Review Project Dashboard Know Plan And Wishlist