Skip navigation

Learn how to upgrade firefox on ubuntu to the latest version. Follow this link

http://jaxov.com/2009/09/install-upgrade-firefox-3-5-3-in-ubuntu-linux/

Advertisements

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,

session_set_cookie_params(
 $this->getCookie()->getLifetime(),
 $this->getCookie()->getPath(),
 $this->getCookie()->getDomain(),
 $this->getCookie()->isSecure(),
 $this->getCookie()->getHttponly()
 );

-And Replace above code by the folliwng one,

session_set_cookie_params(
 $this->getCookie()->getLifetime(),
 $this->getCookie()->getPath()
 //$this->getCookie()->getDomain(),
 //$this->getCookie()->isSecure(),
 //$this->getCookie()->getHttponly()
 );

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

I was very curoius these days to find a source wherein I could compare the leading open source PHP based shopping carts available now days.Finally I managed to find one http://www.hiprank.com/prestashop-vs-zencart.html

It was not a unexpected surprise for me to see the Zencart leading all the way compared to other Open source packages. I being a geek of Zencart , oscomemrce and presta shop. Got to see the comparison of three,  magento being  last in the race.

See this link for more further comparisons http://www.hiprank.com/prestashop-vs-zencart.html.

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.

<?php
header('Expires:
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 .

This post is adapted from my personal blog .

Well Its been a while since the Web 2.0 is in use that introduced a new trends in web development since its evolution. Web 2.0 as officially defined  says

“Web 2.0 is the business revolution in the computer industry caused by the move to the Internet as platform, and an attempt to understand the rules for success on that new platform”

Web 2.0 was more more about business logic application  that empasisis on implenting business application .It also brought about a latest innovations of the time such as communities,forums,social networks, and so on. Webservices and Ajax could be the major ones.

Web 3.0 says

“Web 3.0 is defined as the creation of high-quality content and services produced by gifted individuals using Web 2.0 technology as an enabling platform. ”

Now is the time for Web 3.0. So what is web 3.0  all about and what is something new in it? Well altough web 3.0 still not a final product.An evolutionary stage of the Web that follows Web 2.0. But as of now Web 3.0 promises to bring with it a huge change in the trend of the web development.

Web 3.0 all speaks of semantic web (i.e information and services on the web is defined).This is all set to make a clean way in the next generation of the WWW. So we could say that Web 3.0 is Artificial Intelligence Web based systems. Artificial Intelligence Technology is expected to make the web intelligent. Natural language processing will provide new innovation in buidling database system with a capabilty to convert information from computer databases into normal-sounding human language.

Web 3.0 is expected to give birth to following trends challenges in web arena during its stage of evolution and maturity.(courtesy by Nova Spivack)

  • ubiquitous connectivity, broadband adoption, mobile Internet access and mobile devices
  • the intelligent web, Semantic Web technologies such as RDF, OWL, SWRL, SPARQL, GRDDL, semantic application platforms, and statement-based datastores;
  • distributed databases, the “World Wide Database” (enabled by Semantic Web technologies); and
  • intelligent applications, natural language processing, machine learning, machine reasoning, autonomous agents.

Web development is not restricted to firefox and opera only. The browser statistics says around 21% of the people in the world still use Internet explorer. So it becomes mandatory to maintain a testing environment for internet explorer when carrying out web development in Linux.

inst1It is not possible to install IE directly but there are alternative packages already available that simulates different I.E. versions on Linux. The package you need to install is IEs4Linux. And to install this we need a supporting package called Wine. This software called wine simulates the dll environment of windows thus enabling us to install window based software’s on Linux operating system. To install Wine execute the following command.

sudo apt-get install wine cabextract binfmt-support

To learn the installation of IEs4linux click here.

Follow the steps carefully and enjoy the power of Internet explorer in Ubuntu.

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.

mysqlroot

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.

smarty
I always had a hard time installing smarty template engine for PHP on xampp or wamp. As there are loads of articles on linux smarty installation. But I was finding it hard to find one for Windows.  Here is the detail procedure. The following article is partly adopted from http://news.php.net/php.smarty.dev/2703

1. Download smarty template engine pachake from here

2. Create a folder smarty outside www or htdocs folder and extract the content of Smarty.x.x.x tothe same  smarty folder.

for example C:\xampp\smarty

3. Now edit ypour php.ini file and edit the include library path add the location path of smarty libraries.

for example: include_path = “.;C:\xampp\smarty\libs”

4. Now we have set the library paths. Next is to set the template and cache folders.

Now create a additional smarty folder inside your www or htdocs  ( This is in different from the smarty package folder outside )  and  create two folders templates and configs inside of it.

example: C:\xampp\htdocs\smarty\templates and    C:\xampp\htdocs\smarty\configs

5. In the outside smarty folder containing the whole package create two folders templates_c and cache .

so that it reads as C:\xampp\smarty\templates_c and C:\xampp\smarty\cache.

6. Now your smarty installtion is done. to test create two scripts index.php and index.tlp . Place index.php in your root folder  and index.tpl inside of C:\xampp\htdocs\smarty\templates and copy the following code in to it.

(Please take care of the single quotes in the code below while copying it for your use)
index.php

<?php

// load Smarty library
require(‘Smarty.class.php’);

$smarty = new Smarty;

$smarty->template_dir = ‘C:/xampp/htdocs/smarty/templates’;
$smarty->config_dir = ‘C:/xampp/htdocs/smarty/config’;
$smarty->cache_dir = ‘C:/xampp/smarty/cache’;
$smarty->compile_dir = ‘C:/xampp/smarty/templates_c’;

$smarty->assign(‘name’,’memohnish!’);
$smarty->display(‘index.tpl’);

?>

index.tpl<html>
<body>
Hello, {$name}!
</body>
</html>

and run the index.php in your browser and you should see the desired output