Testing XAMPP Installation
Xampp allows us to work on a local server and test a local copy of websites using PHP code and mysql database. Any local copy can be accessed on the browser using a URL if xampp is active. XAMPP is a cross-platform software so that it can be used on any operating system.
XAMPP Control Panel:
XAMPP Control Panel provides us with complete control over all xampp components. This panel can be used to start and stop various modules. Modules available on xampp control panel are:-
- Apache
- MySQL
- FileZilla
- Mercury
- Tomcat
Testing XAMPP Installation:
In the control panel, click on the start action for the Apache module. This will instruct XAMPP to initiate the Apache webserver. Now open any web browser and type: http://localhost or 127.0.0.1, you should see the XAMPP screen. It means you have XAMPP installed properly on your system.
Follow these steps to check whether the XAMPP server is configured correctly or not, and we can create a PHP test page. This page can be stored under XAMPP’s localhost and can run on the browser.
Steps to create a PHP page:-
- Open the XAMPP directory present in C Drive and choose the htdocs folder (C:xampphtdocs for standard installations). This directory contains all the data required to run a web page.
- Please create a new folder Test for the test page in htdocs.
- Open notepad and type the following code and save the file in the Test folder.
- Make sure you have saved the file with .php extension.
- Open the XAMPP control panel and start the apache module.
- Open your browser and type localhost/Test/test.php in the URL tab. If your browser prints ‘XAMPP Server runs successfully’, it means XAMPP is successfully installed and correctly configured.
The output of localhost:
From the output screen, you can see that the XAMPP server is successfully installed, and you have also successfully written your first PHP program. Now you can use it to create and test your PHP web apps and even learn how web servers work with OpenSSL, Tomcat, and others. We started only the apache module for testing, but you can also begin other modules like MySQL, FileZila, Mercury, Tomcat to create web apps.