Skip navigation

Category Archives: LAMP Technology

What does browser caching means? Answer is save a copy of the web page  visited by the browser for a temporary period.So that any further  access to the same web page does not require the browser to repeatedly collect all the content from the webserver again.But This tends to create problem in case of Dynamic website where content tends to change in minutes time (or even in seconds time).  With browser cache enabled there might be chances that the old content is shown in the same page wheres the previous content has already been updated. There are two ways you can prevent a browser from caching a web page.

1. Meta tags

We use the following lines of htl code to prevent the browser from caching.

<meta http-equiv="expires" content="Fri, 05 Dec 2008 01:00:00 GMT"/>
<meta http-equiv="pragma" content="no-cache" />

This tells the browser that the cached copy of the we page is already  out of date. hence the on reaching this tag the browser will prevent itself from caching the page. The http-equiv=”pragma” plays the same role but is guaranteed to work on different browsers.

2. HTTP Headers

The other way around would be through the dynamic scripting language (like PHP)  header functions (Cache-Control) as shown below.HTTP 1.1 compliant browsers.

Fri, 05 Dec 2008 01:00:00 GMT');
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Cache-Control: post-check=0, pre-check=0', FALSE);
header('Pragma: no-cache');

Lets learn how to enable mod_rewrite on apache2 on ubuntu linux to be able to implement SEO based links and to be able to run other .htaccess settings . TO enable mod_rewrite follow the steps as shown below.

Open your terminal window through Applications->Accessories->Terminal and type in the followg commands

1. ap2enmod rewrite

now open the /etc/apache2/sites-available/000-default

and change AllowOverride None to AllowOverride All .(this appears at around three places in the file.)

also in/etc/apache2/sites-enabled/000-default

3. Now restart your apache using /etc/init.d/apache2 restart

Now you can check for the correctness by placing a .htaccess file in the desired web root.If everything goes fine then the configurtaions are correct else please repeat the procedure again. Hope this would help you out.

In this post i will teach you how to install LAMP on a linux platform. I choose Ubuntu 9.04 to try with the installation.although it has also been tested on ubuntu 8.04

LAMP consist of 3 vital components 1.Apache 2.Mysql 3.PHP and in addition phpmyadmin

Apache Installation

First open the terminal console window (Applications->Accessories->Terminal). Next type in the following command

sudo apt-get install apache2

Follow the onscreen instructions and once the installation is completed type in http://localhost/ in the address bar of your browser. You should see a screes with “It Works!”. This means that the apache installtion is completed successfully.

Next ins the PHP installation.

PHP5 Installation

To install PHP5 type in the following command in the terminal window.

sudo apt-get install php5 libapache2-mod-php5

Follow the on screen instructions for the setup to complete.Once done test the php installtion by creating a php file (test.php) and placing it in the /var/www/ folder of the filesyste,. Next restart your apache using the following command

/etc/init.d/apache2 restart

Now type http://localhost/test.php in your browser address bar. If the php file is executed successfully then the php is successfully installed.

Mysql Installation

To install type in the following command in the terminal window

sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

Once the installtion is completed you get a window to set  the mysql roor password it looks as shown below.


Now your Mysql installation is completed successfully.

We have successfully completed Installting LAMP. Now the additional and very vital tool needed for database management.phpmydmin

phpmyadmin installation

Inside the terminal window add the following command

sudo apt-get install phpmyadmin

During the installation process you will get a window asking you to choose the webserver to be used for phpmyadmin.Please select apache2 as the web server.Once done. you will have to copy the phpmyadmin folder from usr/share/phpmyadmin/ to /var/www/phpmyadmin

Once copied type in http://localhost/phpmyadmin and you get a login form . Enter the database username and password set previously and login.

If login is successfully, Then you have easily made it to the installtion. Now you have successfully installed LAMP on your Linux System.

Hope you Enjoyed reading the article and turned out to be handy. Thank you for reading.