What is the LAMP Stack?
LAMP stands for Linux, Apache, MySQL, and PHP.
- Linux: This is the operating system which free and open-source that has been around since the mid-1990s.
- Apache: This is the web server. Apache web server processes requests and serves up web assets via HTTP so that the application is accessible to anyone in the public domain over a simple web URL. This was also developed by the open-source community. It runs many websites on the internet.
- MySQL: This is the database. MySQL is an open source relational database management system for storing data. Based on your requirements, you are able to customize your database as per your application needs. Some of the major companies around the world utilize the My SQL database to run their website.
- PHP: This is the programming language. PHP is a well-recognized scripting language that works with Apache to create dynamic web pages. This allows you to add more of a dynamic feel to your website by allowing you to use language to pull and return information to and from a database.
Okay Great! But… how do they work together?
The first step in the process is when the Apache web server receives requests for web pages from a browser. If the request is for a PHP file, Apache will pass the request to PHP, which will load the file and execute the code contained in the file. PHP also communicates with MySQL to fetch any data referenced in the code.
PHP then uses the code in the file and the data from the database to create the HTML which makes the web page on a browser visible. The LAMP stack is very useful in handling large amounts of data due to its dynamic nature, efficiency and flexibility
After running the file code, PHP then passes the resulting data back to the Apache web server to send to the browser. It can also store this new data in MySQL.
Companies using the LAMP Stack
- Facebook (During the initial states of it’s launch)