How to install PHP/Apache in windows?

In this article we are going to see how can we setup PHP environment in Windows PC. I will do that section-wise, so that if we follow steps, we can install in other versions of windows/Linux also.

Step 1 : Download PHP binaries : There are lots of PHP distribution, but I am going to use most popular sourceforge.net projects. So download the binary
a. XAMPP from this link or
b. WAMPP from this link
Here we get the main PHP binary but we do not need as both XAMPP and WAMP .

Step 2 : Extract Downloaded binary(or Install). If we Extract or install the downloaded item in a location to a drive,( I have located to D:\ drive ). We will get shortcuts of control pannel. If you do not get shortcut, you will find in D:\xampp\xampp-control.exe (for XAMPP)
and D:\wamp\wampmanager.exe (for WAMPP)

Step 3 : Run Control Panel : For XAMPP The control panel looks like this

And WAMP, control panel look like this.

We can start & stop services which are included in the control panel. Usually a both have basic Apache server hosted PHP, MySQL. XAMPP have some extra servers like fileZila, tomcat etc.

Step 4: Adding PHP to path variable: Go to Control Panel -> System -> Advance System Settings -> Advance -> Environment Variable. Now, in system variable section , double click path and add the location where the php.exe present in the end .