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..
0
lionaneesh's Avatar, Join Date: Mar 2010
Invasive contributor
Thanks for accepting and i hope the Viewers like it!!!
0
kumarmannu's Avatar
Banned
Thanks dear great.......................
0
lionaneesh's Avatar, Join Date: Mar 2010
Invasive contributor
Quote:
Originally Posted by kumarmannu View Post
Thanks dear great.......................
My Pleasure
0
alexsmth114's Avatar, Join Date: Mar 2011
Go4Expert Member
Great post, keep them coming!!..
0
Ana_Campos's Avatar, Join Date: Jan 2011
Ambitious contributor
10x for the info. Also like a lot the diagram.
0
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..
0
seangtz's Avatar, Join Date: Jun 2008
Ambitious contributor
Cool article !!!!!!!!!!!
0
amrithaa2011's Avatar
Banned
hi,

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