Author: Sankaranand

  • Creating a basic Zend project using CLI Tool in Windows

    Creating a basic Zend project using CLI Tool in Windows

    Zend Framework is an object oriented web application framework that uses the MVC (Model-View-Controller) Architecture.  I have been using Zend Framework  for the past one year to build php based web applications. Out of this period i found many freshers who wanted to start with Zend Framework, struck at the first point of creating  tree structured directories for Zend Framework project and their configuration files. Although the Zend Documentation provides step by step instruction for creating your own basic project, it failed to give a detailed instruction for Windows Users to create a directory structure automatically using the CLI Tool for Windows.

    If you don’t understand what it is about, well then i am referring this point of Zend Framework Documentation.  Ok this article explains how easy and simple it is to use a ZF Tool to create Zend Projects automatically from command console.

    The First Basic step is to download the Zend Framework Package itself. You can Download the Package from here.

    After Downloading, Extract the folder and note the path of it. In my case i have extracted at  C:\Zend so i will be using this all over my instruction. (Note in this example i am taking Xampp for Windows as example).

    The next part is including the Zend Library in php.ini file. You can find the php.ini file in C:\xampp\php\php.ini.  Open it with the code editor and find this line which is usually at line no 794.

    include_path = “.;C:\xampp\php\PEAR”

    Now include the path where you have extracted the Zend Framework, so the above line changes like below

    include_path = “.;C:\xampp\php\PEAR\;C:\xampp\php\ZendFramework-1.11.7\library”

    and Close the php.ini file.

    You have successfully included the Zend library with php. The next step is to create an environment path for php as well as Zend Framework.  Try to find three files inside the \bin directory of zend framework package you just extracted. The bin folder contains a zf.php, zf.sh, and zf.bat.

    According to Zend Documentation, these files are client wrappers which are responsible for finding the proper php.exe, finding the zf.php, and passing on the client request. The zf.php is the responsible for handling and understanding your environment, constructing the proper include_path, and passing what is provided on the command line to the proper library component for dispatching. Since we are in Windows environment we shall be playing with zf.bat file.

    The next part is to help zf.bat script to locate the directory of Zend Library. By creating an environment variable called ZEND_TOOL_INCLUDE_PATH, the ZF tool can identify the location of Zend Library. If you have no idea how to create an environment variable in Windows, then please check this MS Knowledge Base.

    Create either a System or User Environment Variable with the following

    Variable Name: ZEND_TOOL_INCLUDE_PATH

    Variable Value: C:\xampp\htdocs\ZF\library

    Additionally you can also create a PATH Environment variable for PHP Complier and Zf.bat File. To do so create a system or user variable called PATH.

    Variable Name: PATH

    Variable Value: C:\Zend\bin;C:\xampp\php

    If you can find a variable called PATH already then you can append values by using a semicolon like above.

    Finally Restart your System for changes to take effect. Now test if you have correctly configured the Environment variable by opening a command window (Start->Run, Type Cmd).

    In the cmd window, type php -v to check the php version or zf show version to check the Zend Framework Version.

    The next step is to Create a Zend Project. Navigate to the htdocs folder in Command Console or cmd and type the following command.

    zf create project <projecttitle>

    Thats it, you can start using the basic zend project by accessing http://localhost/<projecttitle>. With this predefined configuration, you can start creating modules, controllers and add actions in it.

    Learn the basic structure and try to modify the code. That’s it. Happy Programming! If you have any queries feel free to drop your comments. I would try to assist in possible time.

  • Buy and Sell in Internet with Sahipasand

    sahipasand

    It was yesterday that when i was looking for people selling second hand Enfield bikes i came across this simple and clean site called Sahipasand . At first i had no intent to browse through it as i thought it was just another random site with bot generated listing. But i tried my luck and found some reliable listing especially in my place Pondicherry.

    To my surprise i can find more than 250 products alone in my city (Pondicherry) in different categories. This added to my interests and i began to explore some of the listings as well as features of the site.I thought it is a good idea to share a site like this to my readers. Sahipasand (right choice in Hindi) is a free classified site, where you can buy and sell anything for free. Yes you are right i could say its indian version of Craigslist !

    One of the reasons why this site stands unique is that it has no ads; they don’t charge you for anything.  You dont have to pay for listing your ad or for contacting a seller. It’s completely free and you don’t even need to register. The site acts as a middleman to connect you to the seller/buyer free or charge 🙂

    SahiPasand.com is owned by SCM Ventures which is under Schibsted ASA and its subsidiary Schibsted Classified Media (SCM).  SCM is currently the biggest online classified advertising company in Europe. The site looks elegant and simple so does the usability. With Sahipasand you can sell almost anything because they provide a wide range of categories to choose from like in ebay. They also have separate sections for selling cars, real estate and posting jobs . From the start the major thing i am obsessed about this site is its ease of use. You can simply narrow down your search and find what you are looking for!

    Every listing is thoroughly checked and verified by the team and then it’s approved for listing. For example check this product listing where i ended up searching Enfield in Pondicherry. I can directly contact the buyer without any brokerage charges. Currently there are 45252 ads online which is good for a startup site.

    Just browse through the site to experience yourself.

  • The Silent National Anthem – Please Stand up and Watch

    The Silent National Anthem – Please Stand up and Watch

    Somedays back i updated a status message in facebook something like this -> “How many of you feel a sensation and a special feeling when you hear our National Anthem” Almost all of them said Yes. National Anthem is not just a sound or music, its a Mantra which creates unexplainable emotion for every Indian who hears it. Please watch the video below. To its honour and glory of motherhood, I almost cried watching the video for how beautiful it has been created and how we are ruining our motherhood !

    Can you explain the emotion and a power you felt watching this video ? Do remember you are Indian, Sathyameva Jayathe(Truth Alone Triumphs)!! This Wonderful video was created by Big Cinemas !

    Code of Conduct: There are few set rules about reciting “Jana Gana Mana” which includes not singing it under any cover or under any imperfect state of mind.

  • How to troubleshoot problems while installing Magento in localhost

    How to troubleshoot problems while installing Magento in localhost

    I have to agree that most of us face a lot of issues while installing the latest version of Magento 1.4.2.0 in localhost. The version was released on December 8, 2010. So I thought of writing an article that would sort out the basic issues one would  face during magento installation. I am not much familiar with magento and this is my first experience trying it.

    Invalid Base url ( Please enter a valid URL. Protocol is required (http://, https:// or ftp://):

    You will face this error usually when the base url entered is like http://localhost/…./, you can easily resolve this issue either by simply replacing localhost with “127.0.0.1” . So your url goes like this

    http://127.0.0.1/magento/

    or else you can force magento to accept your localhost as url by modifying the validation.js file which is present in the magento installation directory at js\prototype\validation.js (note I don’t recommend doing this for any live servers, just for development and testing purpose).

    go to line 500 where you will see something like this

    ['validate-url', 'Please enter a valid URL. Protocol is required (http://, https:// or ftp://)', function (v) {


    return Validation.get('IsEmpty').test(v) || /^(http|https|ftp):\/\/(([A-Z0-9][A-Z0-9_-]*)(\.[A-Z0-9][A-Z0-9_-]*)+)(:(\d+))?\/?/i.test(v)
    }],

    remove all the regular expressions present and simply return true. So the above code will be changed to something like this

    ['validate-url', 'Please enter a valid URL. http:// is required', function (v) {
    return true;
    }],

    and for extra care , I would advise you to

    Check the Skip Base URL Validation Before the Next Step option to prevent any validation of url. So the final selection would be like this

    Maximum Execution time exceed error.

    If you believe or not, Magento will create about 318 tables in your database. I was astonished becoz I used to work with very light content management systems like wordpress etc and this is the first time I am trying a powerful e-commerce site like Magento which has hell lot of tables.

    This is the reason why many of us end up with an error “Maximum Execution time exceed error.” The default maximum time execution limit for php which we have configured is not enough to posses such a powerful system.

    So if you are using a distribution system like xampp or lamp, you can simply find the php folder and configure the php.ini file

    Usually php.ini file can be found in c:\xampp\php\php.ini

    find two values which usually present at line 440 and 450. Change the default value to either 0 or 3600

    max_execution_time = 3600
    max_input_time = 3600.

    assigning value as zero (0) would give it infinite time for execution.

    These are the common issues one face during the installation of latest version of Magento 1.4.2.0.

    Unable to login after Magento installation in localhost:

    After the installation, I faced another problem. It wont allow you to login if you have used localhost as your base url instead of 127.0.0.1. This is because it wont accept cookies from localhost. You can resolve it by commenting out unwanted variables in session cookies in Varien.php. This file can be found in app/code/core/Mage/Core/Model/Session/Abstract/

    go to line 78 (varies based on versions) and you will find the array as shown below

    $cookieParams = array(
    'lifetime' => $cookie->getLifetime(),
    'path' => $cookie->getPath()
    'domain' => $cookie->getConfigDomain(),
    'secure' => $cookie->isSecure(),
    'httponly' => $cookie->getHttponly()
    );

    comment the last three lines see example below.

    $cookieParams = array(
    'lifetime' => $cookie->getLifetime(),
    'path' => $cookie->getPath()
    // 'domain' => $cookie->getConfigDomain(),
    // 'secure' => $cookie->isSecure(),
    // 'httponly' => $cookie->getHttponly()
    );

    Make sure you remove the comma after getPath(). Check screenshot

    If you come across any other issues do comment below to let me know.

  • The Great Escape

    I don’t know how they managed to take this but i cannot stop myself from sharing this beautiful video..I can see some mix of CGI and artists creativity over the video. Very well compiled and shot.

    Hope you like it.

  • Free October Calendar Wallpaper Gandhi Jayanthi Special

    Happy Gandhi Jayanthi to all of you. This is a particular day to remember one great man who stood as a father of our nation. Remembering Gandhi is not just about having him  in your currencies but in your desktop too :). It is my great pleasure to post October Calendar Wallpaper which is designed by my colleague Rafi. He is a Web, Graphics and Motion designer and have more than 8+ years of experience in this field.

    You can check  his portfolios in his site Rafimmedia.com. He has designed a Gandhi Jayanthi Featured Theme Calendar Wallpaper for this month which is available in many resolutions to fit your desktop including the iphone. Thanks to Rafimmedia. Feedback about the design is appreciated and would encourage Rafi to design more wallpapers.

    Download Gandhi Jayanthi Wallpaper With Calendar

    1024 x 768
    1280×800
    1280×1024
    1440×900
    1680×1050
    1920×1200

    Download Gandhi Jayanthi Wallpaper Without Calendar

    320×480 Iphone
    1024×768
    1280×800
    1280×1024
    1440×900
    1680×1050
    1920×1200

    Hope you like this beautiful wallpaper. Please do share it.

  • Html5 Tutorials and Resources for Web Developers

    Html5 Tutorials and Resources for Web Developers

    Html5 the next version of HTML Standard offers many interactive features and flexibility to web developers by introducing new markups and API. There are several reasons why it is a good time to adopt HTML5 in your designs. The major would be that almost all the latest and upcoming version of browsers now provides the native support of HTML5 without depending any libraries. HTML5 is not a start from scratch, it is an upgrade from existing HTML4. So adopting HTML5 would be like upgrading your knowledge to meet the standards for Future Web Designs.

    I have gathered some of the best available tutorials to learn and adopt HTML5. Hope it helps you out.

    W3Schools

    W3schools is the best place to start and understand the basic html5 tutorials. It covers various sections and gives information about HTML5 new Tags, Elements, Video, Audio, Canvas, Forms and Events with Try out Examples. W3Schools also contains individual explanation of each tags with examples.

    HTML5Rocks

    A Site developed using HTML5 by Google is a HTML5 Playground. Provides an interactive HTML5 Sideshow which highlights and showcases the functionality of HTML5 as well as let you test it. Test center for experimenting each of the apis and provides step by step tutorials.

    1st Web Designer

    They have an interesting article which covers a huge list of HTML5 Tutorials starting from the beginners to advanced levels covering almost all the parts from layout creation to functionality.

    Webdesignledger

    They gathered a list of 15 essential and useful HTML5 Tutorials and Cheat sheets. Cheat sheets are very handy and useful. You can take a printout of it and stick over your desk for quick reference.

    NTT.CC

    Really nice collection of tutorials from various sites.  Also included CSS3 Tutorials and basic HTML functionality explained.

    Webappers.com

    The folks at Webappers have collected some must have CSS3 and HTML5 Tutorials aggregated from various other HTML5 and CSS3 Tutorials

    HTML5tutorial.net

    Best place to find many useful guides for HTML 5 resources including HTML 5 Tutorials, examples and references.

    Hope this tutorial would be a piece of use for enthusiastic developers.

  • Using Underground Data Center to Store your Data.

    Using Underground Data Center to Store your Data.

    Backup is a mandatory option for an individual as well as businesses. We have our own critical and confidential data that requires backup stored in some place is important. I usually use external hard disk to store my data like client docs, projects, resources, backup image and software applications. We also store them in DVD Disks which lasts long only upto 5 years. Hard disks too have their own read and write cycles which works upto an approximate lifespan but what if there arise a situtations like drive being stolen or damaged. You are out of choice and then only end up storing your data in the cloud.

    There is a major concern over storing our valuable data in cloud when compared to storing it in our disks. Yes, its the privacy and security issue. When it comes to critical data like bank details, confidential documents, personal images, proofs.. we need a place where data can be secure, private as well as invulnerable to any means of risks and vandalism. My quest for a service online which overcomes my concern landed me in a different discussion. I seeked my cousin’s advice who is a product manager at Trend Micro. He told me about this trend called Underground Data centers. Its like Old wartime bunkers, caves, mountains turned down into a secure place for establishing Data centers.

    When i was exploring about companies that have underground datacenters i came forward with this service called Mount10 (former name Swiss fort Knox) which stores all your date inside the Swiss Alps Mountain. Yeah i am not kidding..!! Mount 10 consists of two independent underground data centers inside the Swiss Alps which are being operated for storing, archiving and securing physical as well as electronic assets. The facilities are equipped with the latest technologies, physically separated by 10km and connected internally as well as with the Internet by a high performance network.

    Why we should you go for Underground Data Centers ?

    These type of Underground Datacenters are resistant against any known civil, terroristic and military threat including electro magnetic pulse and also offers protection against environmental disasters such as earth quakes, floods, landslides and large-scale fires. They are usually addressed as Zero Risk Infrastructure.

    Click the image for full preview

    Mount10,  an automated Backup Service (Underground Datacenter ):

    The folks at Mount10 had given me a 4GB Free Account for Lifetime Period for testing their servers. With the help of Mount10 Client i can automatically backup and sync in realtime. Mount10 allows you to select an account name, with password and encryption key. This encryption key is the most important part, without which u cannot access your account and it is highly impossible to recover the key. Also you dont have to worry about your confidential and critical data being stored at their servers and being intercepted by someone since Mount10 uses 448-bit encryption technology the highest internet banking standards.

    Some highlighted features of Mount10 Includes

    • Underground “zero-risk” infrastructure and protection against nuclear, biological or chemical attacks including Full EMP (electro magnetic pulse) protection.
    • 24h surveillance, ensured by a civil and military concept
    • 448-bit encryption for storage
    • Fully automatic backup via the Internet
    • Data history with search functionality
    • Dual Internet Providers
    • Independent supervision
    • Nominal Rates for Storage
    • Data vaulting to SWISS FORT KNOX
    • Manageable Client for All versions of Operating Systems

    To know more about their features and service plans, i recommend visiting their site here.

  • If he can why can’t We , a Public Awareness video from News 9

    This is an exceptional video from News 9 for Save Water Campaign. After watching this i really felt bad for a minute and embarrassing about we, the Humans, the so called Six Sense Animals.

    A Very touching one from News 9. Thanks. Is the monkey trained to do so or is that it’s nature ? Who cares ? Until it is used for a good initiative. Congrats News 9.