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..
Invasive contributor
22Feb2011,12:28   #2
lionaneesh's Avatar
Thanks for accepting and i hope the Viewers like it!!!
Banned
22Feb2011,16:27   #3
kumarmannu's Avatar
Thanks dear great.......................
Invasive contributor
22Feb2011,16:47   #4
lionaneesh's Avatar
Quote:
Originally Posted by kumarmannu View Post
Thanks dear great.......................
My Pleasure
Go4Expert Member
21Mar2011,11:22   #5
alexsmth114's Avatar
Great post, keep them coming!!..
Ambitious contributor
21Mar2011,16:48   #6
Ana_Campos's Avatar
10x for the info. Also like a lot the diagram.
Invasive contributor
22Mar2011,12:59   #7
lionaneesh's Avatar
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..
Ambitious contributor
28Mar2011,10:41   #8
seangtz's Avatar
Cool article !!!!!!!!!!!
Banned
21Jul2011,12:49   #9
amrithaa2011's Avatar
hi,

how the Dmoz free users getting benefits...???
Go4Expert Member
14Sep2011,08:11   #10
alexander007's Avatar
I'm new to this, on going through your article got clear understanding about lamp.