Basics of LAMP - How it Works?

lionaneesh's Avatar author of Basics of LAMP - How it Works?
This is an article on Basics of LAMP - How it Works? in Web Development.
LAMP is acronym for Linux , Apache , MySql , PHP/Perl/Python(CGI)..Its a solution stack of opensource programmes and its a platform Wherein each component plays a specific and important role..

Components

  • Linux - Linux Provides the basic Operating System and Environments
  • Apache - Apache replies to HTTP Requests or passes them to PHP interpretter..
  • MySQL - It serves as a data storage functionality
  • PHP - PHP interpreter parses PHP Code and executes..

How it works



When user requests for a page like :-

http://localhost/index.php

The request is received by the Operating System I.e Linux and then the request is handed over to apache..

Apache handling the request check if the url requested is a PHP or a CGI page.. If yes it hands over the request to the PHP interpreter.. Now it replies with the requested resource eg :- index.html etc..

The PHP interpreter parses the requested file , executes the PHP Code .. If the code includes database queries the request is handed over to MySQL … Mysql deals with the requests received and executes them...

Once the script interpreter has completed executing the program it returns the result to the browser..

The figure below will give a better understanding :-

Code:
	 _______________
	/ Client       /
       / Web-Browser  / 
      /______________/
           ||
Initiates  || http://go4expert.com/index.php
request	   ||
       __________			    ___________	               ________
      /		/  Hands over to apache	   /          / ------------->/       /
     / Linux   / =======================> /   Apache / PHP Parsing   /  PHP  /
    /_________/ <------------------------/__________/ <-------------/_______/
	           HTTP RESPONSE				     ||
								     ||SQL QUERY
						                 _________
								/        /
							       / MySql  /
 							      /________/
Thats all for this article...Stay tuned for more..
lionaneesh's Avatar, Join Date: Mar 2010
Invasive contributor
Thanks for accepting and i hope the Viewers like it!!!
kumarmannu's Avatar
Banned
Thanks dear great.......................
lionaneesh's Avatar, Join Date: Mar 2010
Invasive contributor
Quote:
Originally Posted by kumarmannu View Post
Thanks dear great.......................
My Pleasure
alexsmth114's Avatar, Join Date: Mar 2011
Go4Expert Member
Great post, keep them coming!!..
Ana_Campos's Avatar, Join Date: Jan 2011
Ambitious contributor
10x for the info. Also like a lot the diagram.
lionaneesh's Avatar, Join Date: Mar 2010
Invasive contributor
Quote:
Originally Posted by Ana_Campos View Post
10x for the info. Also like a lot the diagram.
Thanks...and if you want to thank this article..
You can add ro my reputation by clicking the thanks button at the bottom of article..
seangtz's Avatar, Join Date: Jun 2008
Ambitious contributor
Cool article !!!!!!!!!!!
amrithaa2011's Avatar
Banned
hi,

how the Dmoz free users getting benefits...???
alexander007's Avatar, Join Date: Sep 2011
Go4Expert Member
I'm new to this, on going through your article got clear understanding about lamp.