One of the most searched information about PHP is how to install it on a Windows environment. We’re going to use the following lines to help you understand the procedure, but, firstly, let me talk a bit more about what PHP needs to run.
As you already now, PHP is a server side scripting language that helps you program web sites so you will need to have a web server running in your Windows XP or Windows Vista computer. If you need PHP to build complex application you will need a database to store your data, here is when MySQL appears on the stage.
So, in this short procedure we’re going to use Apache as a server, MySQL as our database and, off course, PHP as our programming language.
You have two methods to follow on:
1. Using ApacheFriends.org XAMPP distribution.
This is without a doubt the simplest procedure you can apply in order to get your Windows PC running PHP. All you have to do is go to this link http://www.apachefriends.org/en/xampp-windows.html, scroll down a bit and download XAMPP to your PC. After that, just double-click the file and continue with the installation wizard steps.
This procedure will automatically install, Apache, MySQL and PHP (and some other stuffs) and you have plenty instructions to follow on at that site.
2. Using the manual step by step procedure.
This is my favorite procedure (I’m a developer do you remember?) because I have plenty control over every program. Ok, let’s go…
First you need to download the files:
- Apache is at: http://httpd.apache.org/ – I recommend you to install 2.2.X version because as they say: “…represents the best available version of Apache HTTP Server”
- MySQL is at: http://dev.mysql.com/downloads/ – Click on “take me to the community downloads!” and download the last stable version for windows. MySQL 5.1 at time of writing this.
- PHP is at: http://www.php.net/downloads.php – Go there and download PHP last available version.
Now we’re going to install each application as they were independent applications, later we will join them to work together.
2.1 Installing Apache
Installing apache is as easy as follow the installation wizard, the issue here is to know what to fill in every textbox in the fourth step. So, doble-click the first wizard steps, I recommend you to take some time to read every screen, until you reach the fourth screen where you will type:
I’m adding the full wizard steps in this gallery:
2.2 Installing MySQL
2.3 Installing PHP
Finally, to add PHP to your current Apache installation just download and unzip the file and copy the whole folder to your C drive and rename it php (c:\php). Then add the following lines to the end of your httpd.conf file:
# Loading PHP 5 Module
LoadModule php5_module C:/php/php5apache2_2.dll
AddType application/x-httpd-php .php
PHPINIDir c:/php
You can get this configuration file from: Start - All programs – Apache HTTP Server 2.2 – Configure Apache Server – Edit the Apache httpd.conf…
That’s it. Easy. Right?













