Tools-needed-to-Run-PHP-on-local-server

Tools needed to Run PHP on local server – PHP Tutorial Part 2

We introduced PHP to students in the Part 1 of this tutorial. In order to run PHP locally or in your computer or laptop you will need following resources:

  1. Apache Web Server

Note – Nginx (high-performance HTTP server), lightspeed (open-source web server) etc. are some alternatives to Apache.

  1. PHP

You can download php from www.php.net/downloads

  1. MySql Server

Needed to Create and Test Databases.

These three resources must be present in your computer in order to run and test PHP code.

PHP can run on any operating system from Microsoft, Linux and Mac-OS if you have necessary resources installed.

If you don’t want to install php manually you can use a simple tool that will install APACHE, PHP, PERL and MYSQL in your computer.

You will need Web Browser like Google Chrome or Mozilla to run your web pages.

We suggest you to use any of the following tools to Install Server for PHP and MySql in your PC or laptop:

  1. XAMPP – https://www.apachefriends.org/download.html
  2. AMPPS – http://www.ampps.com/download

XAMPP is commonly used for running PHP websites in local server but AMPPS is also as efficient as XAMPP.

These tools will install all resources needed to run PHP in Local Server.

After Installing XAMPP you will get a folder in your default drive (or chosen drive while installing) named XAMPP.

xampp-folder

Inside XAMPP folder you will find configuration files for all resources which you can see in this image.

Tools needed to Run PHP in local server

Inside the XAMPP folder you will see HTDOCS folder. This HTDOCS folder is the root folder of your local website hosting.

step by step php tutorial

Directories created within HTDOCS folder will represent new Websites.

For Example: If you will create a directory named SLIDESCOPE in your HTDOCS folder then inside the SLIDESCOPE named folder you will put your web pages and files.

After Installing XAMPP you will find XAMPP CONTROL PANEL in your computer. It looks like this:

xampp-control-panel

Yu can see that it is showing the Operating System Details and the status of APACHE and MYSQL server.

In order to run PHP and MySql you have to start the APACHE and MySQL in control panel.

Leave a Comment