Sunday, November 13, 2011

How to Install PHP

php installation

Summary: In this tutorial I will explain you what it needs to run php code on your local machine, how to setup WAMP server, how to create PHP files, how to run PHP files and lastly there is a video tutorial on How to install PHP in both English and Hindi.

What you need to Run PHP Scripts

To run PHP code on your local machine you need three things:

  1. Web Server
  2. PHP Interpreter
  3. MySQL Databases (Optional)

You can install Web Server, PHP interpreter and MySQL databases and configure each of them manually, but to make life easy developers have made all in one setup packages called WAMP, LAMP, MAMP and XAMP which will automatically install and setup PHP environment on your Windows, Linux or MAC machines.

  • WAMP = WINDOWS, APACHE , MySQL, PHP Interpreter
  • LAMP = LINUX, APACHE , MySQL, PHP Interpreter
  • MAMP = MAC , APACHE , MySQL, PHP Interpreter

Download the package for your operating system and install it, I downloaded the WAMP package since I'm working on Windows machine, then start the Wamp server and place files with .PHP extension in the Web Server's root folder, in Windows it is C:\wamp\www and for aces sing PHP files you need to start your web browser and open the localhost by going to http://localhost/

How to Install PHP [Video tutorial in English]

How to Install PHP [Video tutorial in Hindi]

This is the third chapter in which I explained you How to Install PHP on your local machine, in the next chapter I will explain you How to write a Simple Hello World program in PHP .