Skip navigation

Category Archives: PHP

Magento has emerged to be one of the most widely used open source ecommerce solutions for online merchants all over the world. So, I thought of having a try at. Installation worked fine. Make note,  magento compulsarily requires CURL library be installed. Finally managed to get Magento installed. But not later I realised a problem with magento when I tried logging in to the admin section with firefox browser. This login form was not working. hmm. that looked very stranage. It was clear in my mind that this was obviousy not a username or password error but something related to sessions or cookies. I was a stranger to magento. No idea of how the sructure is and no idea of the file system.What were next help? obvious google. googling googling took me to a number of forums and articles and finally I managaed to get a hold of it. The problem roots to the storing of cookies in firefox. when tried on localhost te system does not recognize localhost as a proper address and hence does not save the cookies in browser folders. The follwing code thus help in fixing the issue and I found it to be sure shot solution rather that paying with browser cookies settings.

-Go to the  app/code/core/Mage/Core/Model/Session/Abstract/Varien.php file within your magento directory.

-track the following code in the file,


-And Replace above code by the folliwng one,


Now try logging in to your admin and it would work wonders.


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');

PHP programming language has been listed among the first 3 most popular and widly used computer programming languages in the world. A Programming language is considered to be one that compiles or interprets on its own using its own independent engine and not dependent on a third party engine or programming language. As per the latest survey of TIOBE programming index ,PHP is amongst the most widly used language. Owing to its simplicity, developer friendly and fantastic performance the language by itself qalifies to be the best.The support of Frmeworks like CakePHP,Zend,Codeigniter,Symfony, provides a systematic approach towards a development of websites and other web applications. Emergence of PHP company like Zend has also made a big impact on the language progress.

I personally believe that PHP would soon lead among the web development platforms and web programming language. Its compatibilty with database systems, Its support for object oriented language, and so latestdevelopment of design patterns makes it amongst the contenders to languages like JAVA  and C.

As per the extracts taken from the TIOBE blog, What makes PHP’s number 3 position remarkable is that the numbers 1 and 2 are very much general purpose languages. Java and C are pretty much used from anywhere from low level processes to desktop applications. An extension of PHP called PHP GTK makes you to run php as a desktop applications.

This proves us the point that PHP is not gona die so soon and will emerge more and more .