Detailed Step-wise Instructions to Setup PHP Development Environment on Windows XP PC
Wednesday, April 25th, 2007Software must be installed in the following order:
- MySQL 4.1.22
- PHP 5.2.2
- Apache HTTP Server 2.2.2
- 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

Step II: Select Setup Type and click Next

Step III: Click Install

Step IV: Select account type

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

Step VI: Click Next to continue

Step VII: Select configuration type and click Next to continue

Step VIII: Select server type and click Next to continue

Step IX: Select database usage

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

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

Step XII: Set the networking options and click Next

Step XIII: Select the default charset and click Next

Step XIV: Set the Windows options and click Next

Step XV: Enter the root password and click Next

Step XVI: Click Finish to close the Wizard

Download PHP 5.2.2 from http://www.php.net/downloads.php
Installing 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”
- Rename php.ini-recommended (available under “C:\php”) to php.ini and open it using an ASCII text editor such as Notepad
- In line no. 513, change doc_root = to doc_root = “your directory”, the directory out of which you will serve your PHP pages.
- In line no. 520, change extension_dir = to extension_dir = “C:\php\ext”, the directory in which the loadable extensions (modules) reside.
- 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

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

Step III: Enter server information and click Next

Step IV: Select setup type and click Next

Step V: Select folder to install and click Next

Step VI: Click Install to begin installation

Step VII: Click Finish to exit the wizard

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.
- In line no. 177, change Directory “” to Directory “directory already set in DocumentRoot”
- Add the following code at the end of the file
- 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.
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
Download phpMyAdmin 2.6.4 from http://www.oldapps.com/download.php?oldappsid=phpMyAdmin-2.6.4-pl4.zip
Installing phpMyAdmin
- Create a directory phpMyAdmin in your 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
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
- FF 2.0 .Download from http://www.firefox2.com/en/
- OpenOffice 2.2 .Download from http://download.openoffice.org/index.html
- FileZilla .Download from http://sourceforge.net/projects/filezilla/
- Putty SSH 0.59 .Download from http://www.softpedia.com/progDownload/PuTTY-Download-1001.html
- Crimson Editor 3.70 .Download from http://www.crimsoneditor.com/english/download.html





