Using XAMPP to create a local test server
An important part of web development is in testing. A developer could code what they think is a beautiful and functional web application, but once it gets handed over for testing there might be a whole load of unforeseen faults with it. That’s why it’s important to have a non-live test environment, where these bugs can be found and fixed before the website goes live to the public.
One way of building a local test environment is with XAMPP. XAMPP is a free and open-source software package that bundles in everything needed for developers to create local web servers for testing.
‘XAMPP’ is an acronym (or initialism – depending on whether you want to pronounce it as ‘Zamp’ or ‘ExAyEmPeePee’) where:
X represents ‘Cross-platform’
Cross-platform functionality means that XAMPP works with Windows, macOS, or Linux operating systems.
A stands for Apache HTTP Server
Apache is the most popular web server, and Apache products power over half the internet. In XAMPP, Apache is the web server that is locally ‘hosting’ the web application and displaying it.
M stands for MariaDB
MariaDB is the relational database management system in XAMPP. A database stores any data collected or distributed on the web application. The ‘M’ used to stand for MySQL, but in November 2015, XAMPP developers replaced MySQL with MariaDB as its primary database application. MariaDB is an off-shoot of MySQL and has many of the same features, with a few improvements. Fortunately, this change had no effect on the ‘XAMPP’ abbreviation.
P stands for PHP
PHP is a server-side scripting language. It is the language behind some of the most popular websites on the internet (e.g. Facebook, WordPress) and works perfectly with MariaDB. This makes it an obvious choice as a component of an XAMPP server.
P stands for Perl
Perl is a dynamic programming language that is used in higher-level web applications, system administration and network programming. Although there is no official standard for the order of the Ps in the ‘XAMPP’ abbreviation, it’s commonly accepted for PHP to go first.
As such, the entire abbreviation can be written as ‘Cross-platform Apache HTTP Server, MariaDB (previously MySQL) PHP & Perl’. Catchy.
These components together in one package provide a developer with all the tools needed to host a local, offline test environment, without having to download and install everything individually. A XAMPP server can be downloaded from one single file, and installed with the help of an intuitive setup wizard. After some customisation and configuration of additional modules (like Tomcat, FileZilla and phpMyAdmin) the test server is ready to use.
From there, the developer can start a new project, insert their PHP or Perl code, and XAMPP will execute it and host it in a local test environment. This test environment is not connected to the internet, but can be accessed and shared with others for testing through FTP and localhost. This offline test environment means that if any bugs are found, they can be fixed before the code has been hosted on the live web server.
XAMPP or WAMP? XAMPP or LAMP? XAMPP or MAMP?
There are similar software packages to XAMPP that are platform specific. WAMP, LAMP, and MAMP do the same job for Windows, Linux and Mac operating systems respectively. The benefit and disadvantage of XAMPP is that it’s OS-agnostic. It’s a good thing that the package can be run across different platforms, but if a developer is only ever going to need to run it on a Linux environment, then there’s no point using XAMPP, when they only need LAMP. XAMPP consumes far more resources because of all of the additional components, and this higher consumption of resources tends to mean that using XAMPP is slower than LAMP, WAMP or MAMP.
After the website or application has been tested thoroughly in the XAMPP environment, it’s ready to go live. Visit the Fasthosts website for information on Cluster Web Hosting and next-generation Cloud Servers.