In the previous tutorial, we learned what is PHP? Why do we need to learn PHP? In today’s tutorial, I am going to teach you how to install XAMPP or PHP in the local system to execute PHP files? Install PHP
We all know that PHP is a server-side scripting language that’s why we need a server to execute PHP files. All developers install Apache server on their computer to execute PHP. Here, we will install the Apache server and MySQL database also.
Nowadays, most of the server supports PHP such as Apache, Ngnix, IIS server, and many more. To execute PHP files on the IIS server, you have to do some extra configuration because the IIS server designed and developed for .NET technologies.
How to install XAMPP or PHP in local system? Install PHP:
There are two different method to install PHP in local system and execute PHP files:
- Download setup files from the official website of PHP, install, and configure it into the local system.
- Download any one of the packages and execute PHP files
- XAMPP (X-OS, Apache, MariaDB(Mysql), PHP, Perl)
- WAMP (Windows)
- LAMP (Linux)
- MAMP (Mac)
- SAMP (Solaris)
- FAMP (FreeBSD)
Most of the developers use XAMPP package to execute PHP files locally because this package provides various tools at one place such as Apache server, MySQL database, FileZilla FTP etc.
Let me tell you first what is package because many people don’t know what is package and why XAMPP is said to be package? After that, I will describe you installation process of XAMPP.
What is Package?
A package is a collection of multiple applications and code modules that work together to meet various goals and objectives. Here, XAMPP is a package because it contains multiple applications and code modules such as Apache server, MySQL database, etc.
Let’s see an example of a package in real life. When you go to the market and purchase many things and keep that thing in a basket or a bag and the process of keeping things in a bag or basket is called packaging.
Why should we install XAMPP?
XAMPP is a free and open-source cross-platform web server solution stack package developed by Apache Friends, consisting mainly of the Apache HTTP Server, MariaDB database, and interpreters for scripts written in the PHP and Perl programming languages. It stands for X-OS Apache MySQL PHP and Perl. X-OS means it is supportable in any operating system. We should install XAMPP because of following reasons:
- It is available for every operating system.
- Every company install into their working system.
- Every institute use this package to teach PHP to their students .
- It is freely available.
- It has PHP and Perl both.
Install XAMPP on local system (Windows) – Install PHP
Let’s see complete steps to install XAMPP in local system. Here, I am using Windows operating system.
Step 1: First of all, download the XAMPP package from their official website. (Click here for official website)
Step 2: Download XAMPP according to your operating system.
Step 3: Next, open download folder or that folder where your XAMPP package downloaded and double click on the XAMPP exe file. Click on the Next button on the opened pop-up box.
Step 4: Again, a pop-up box will be opened. In this pop-up box, you will select components which you want to install but I recommend you to select all component. After that, click on the Next button.
Step 5: Now, select your folder or drive where you want to install XAMPP. You can install this package in any drive such as C, D, or E. After selecting the drive, click on the Next button.
Step 6: Again click on Next button in next pop-up.
Step 7: Now, your XAMPP is ready to install. Click on the Next button for further installation.
Step 8: After complete installation, a pop-up box will be opened which has a Finish button. Click on that button to finish the installation.
Step 9: Next, select your preferred language.
Step 10: Now XAMPP is ready to use. To run a PHP program and MySQL database click on the start button in front of Apache and MySQL.
Step 11: If both are started successfully then the start button will replace with the stop button otherwise it will show an error.