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.

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.

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.

Set My Computer as Default in Windows Explorer

By Default the Windows Explorer in Windows 7 will open library folder instead of My Computer. In previous version of Windows, we have a My computer Icon that would actually pinpoint to all the higher levels of Drives in our Computer. If you are really annoyed with the default library folder of Windows 7 then there is a workaround for you which will actually change the default target of Windows Explorer to open My Computer.

Follow the Steps below to apply the workaround:

  • Hold Shift and Right click the Windows Explorer Icon in Taskbar
  • Select properties in it and under the Target Field, replace the existing code with the following code below

%SystemRoot%\explorer.exe /n,/e,::{20d04fe0-3aea-1069-a2d8-08002b30309d}

or if you wanted to open a specific drive  you can use the following code

%SystemRoot%\explorer.exe /e,d:\Documents

Where d: is the drive letter and Documents is any of the folder u wanted.

  • Click Ok and Close the Task bar
  • To make this changes to All the occurances of Windows Explorer, Simply Open the Start menu
  • All Programs > Accessories and Right Click the Windows Explorer.
  • Then Invoke the properties and apply the same code above.

Feel free to comment if you wanted any help over it.

Send Unlimited Free SMS to Anyone from Orkut now

I am usually hypo active in all kinds of social networking sites nevertheless how good and helpful they are. But I loved Orkut since its launch and being an active user till now.  Orkut has many features to impress me like scrapping and limited customization etc but now it is used as a target to spread mass spam to users. The day since Orkut introduced html support in scraps and Orkut apps, spammers find their goals easy to achieve.

Talking about Orkut apps, a newly introduced app called SMS Me came into my mind. This app is simply wow; it allows me to send unlimited scraps to any mobile number in India. What’s more could one want? Ok, I agree you! There are many such sites which give the same service but feeling the usability and complexity, I feel SMS Me just like using my own mobile. Upon adding this app, it has an interface in which you can recognize other SMS Me users with your friends’ database and display their profile with link to SMS them.

SMS Me has 5 tabs that include the home, friends, anyone, Inbox and Invite friends.  Let’s have an overview about the features. If your friend is not using SMS Me, it prompts him via scrap to install that application.  SMS Anyone allows sending free sms to any mobile number in your country. I wanted to highlight the point unlimited stating that other services have some restrictions while this app can simply be used to bug someone easily.

SMS Anyone section has two fields for Mobile number and the message to be sent.  Like an ordinary SMS, there’s a limitation of 118 characters per message.  Once u send a message from this app, your friend will receive a SMS from MyCantos masking their destination number with a signature for each message like “Sent by yourmobnumber from www.mycantos.com.

Until now I have been talking about the advantage of this social app from the developer’s perceptive view now let me point out how this could influence Orkut and what disadvantages it has.

  • Encourage spammers to join Orkut
  • Now M-commerce can be spammed easily like never before.
  • No need of entering captca test for each SMS you send which gives privilege for a java script to send mass SMS easily.
  • No option to block specific users, so until you both get compromised you are never relieved.

Final verdict: I love this app and hate it as well…lol.

Free Photoshop 101 Web Design Tips, Tricks & Techniques e-book for limited time

Site point is giving away PDF version of The Photoshop Anthology book. It consists of full fledged Photoshop designs especially for web designers. Usually most of the Photoshop books available across market contain tutorials based on print designs but this book is aimed fully at web designing and how Photoshop impacts it.  Corrie Haffly, a famous web designer and developer is the author who created over 400 website templates and designs. You can have a look at her works in her official site CorrieHaffly.com.

This e-book consists of step by step instructions and tutorials about creating effects and graphics for your website. This is a must for every web-designer who uses Photoshop for their development. Although you can order a hard copy of this book from site point, for a limited period of time they are giving away free download of PDF Versions of this book. As a web designer I myself should not miss this opportunity and so wanted to share this news. Still 12 days remaining for the offer to end, i recommend everyone to download this book doesn’t matter you have to be a web designer but it helps you enhance your Photoshop skills.
What you learn from this book

  • Learn the basics: image sizing, layers, vector shapes, transparency, and more.
  • Create a multitude of attractive buttons: aqua-style, metallic, glassy, etc.
  • Improve digital workflow
  • Create seamless tiling backgrounds: rice paper, brushed metal, and granite, plus many others.
  • Work with text: style it, create special effects, and wrap it around 3D objects.
  • Touch up photographs, match colors, and combine different images.
  • Use eye-catching special effects.
  • Isolate objects from images.
  • Make graphics for CSS rollover buttons.
  • Design an entire web site and easily switch between different versions
  • Optimize graphics for web use.
  • Work smarter: automate your workflow with batch commands and actions.
  • Create animated GIF and more….

Site point provide the download of book in two versions of PDF, High quality version is 64mb and low quality is 23mb. You can simply download the book by entering your website in this site.
Download Now | Sitepoint | Author: Corrie Haffly |

Google Talk Freezes with show music status using Winamp 5.5

winampgtalk1.png

I am a die hard fan of Winamp and using it for more than 5 years. What I like about this music tool is its light and easy to use features. When you compare other media players like iTunes and Jet Audio, Winamp uses a very light and easy to use playlist organizer. If you just want to hear mp3 songs then you can go with Winamp lite version which is not filled with bloats and add-ons.

Coming to the point, we know very well about the famous Google talk’s “show my current music status” and might be using it without any problem in Winamp although WMP needs an in activation. But after installing the latest version of Winamp 5.5, I had a few problems with the Google talk Integration.

Whenever you select the Show my current music track, Google talk either freezes or stops responding. This is actually a technical issue with Google talk or Winamp which is yet to be discovered but many users who have upgraded to Winamp 5.5 are facing this problem, so one of a guy has posted a simple resolution for fixing this bug.

The solution is:

Step 1: Go to the root directory of Winamp which is usually in C:\Program Files\Winamp\

Step 2: Select Tools->Folder Options->View (Tab) and uncheck the hide extensions for known file types and click Ok.

Step 3: Now create an empty file (Right click the mouse -> New -> Text document), so the default file would be like “New Text Document.txt”.

Step4: Rename the above file to “winamp.m3u” and save.

Step5: Close Winamp and Google Talk. Now open again and Your Show Current music track status should work like a charm 

Tip: Google Talk Help Group .

Resolving Internet explorer crash after installing windows service pack 3

iesp3issue.pngLast month Microsoft made a release candidate of Win XP Service pack 3 available for download. So I downloaded the 336 Mb patch and installed it successfully. This patch actually contains security updates and hotfixes issued by Microsoft Corp. up to April 2nd, 2006 excluding Internet Explorer 7 (Thanks MS for it:-)).

Seriously no updates or changes in Windows interface but just a bundle of hot fixes which doesn’t make it special. I like to stay updated always which made me to install it even though it’s a release candidate, but within few days of installing my internet explorer began crashing all the time. On opening Internet Explorer it crashes within a fraction of second from loading a site and pops a message saying “Internet explorer has encountered an error and needs to close”.

After searching Microsoft Technet forums for resolution, I came to know that this is all due the Urlmon.dll thing which was discussed under KB946627. After discussing with a team member working for SP3, I came up with a resolution for this problem.

Resolution:
Warning: This procedure involves editing of registry which would result in serious damage and corruption of date if followed improperly so my kind advice is not to try unless you have clear cut knowledge of what you are doing.

Step 1: Go to Run and type ‘notepad’ without quotes.

Step 2: After the Notepad is invoked, copy and paste the codes given below:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_PROTECT_DECOMPRESSION_FILTER_FROM_ABORT_KB942367]
“*”=dword:00000001

Step 3: Save the notepad as somefile.reg (note the extension .reg)

Step 4: Double click the saved notepad file to add the information to the Registry.

Step 5: A dialog box pops saying “Do you want to add the information to the Registry?” Click Ok and there you go.

Step 6: Restart the Computer, now I believe Internet Explorer would not crash again.

Note:If the problem still persists please feel free to post your comments or queries.

Tuning your gtalk to use as Voip phone and FM receiver

gtalkfm.png

Making your Gtalk as an online FM streaming device is not a complicated task but a simple 3 step process as 123. With the help of a third party service called Gtalk 2 Voip we could attain this functionality.

What is Gtalk 2 Voip ?
GTalk2VoIP is a free and publicly open voice gateway for major Instant Messenger clients. It makes possible voice interoperability between Google Talk, MSN/Live Messenger, Yahoo! Messenger and SIP phones without any additional software installation.

How can I hear FM in Gtalk?
Teen Taal 110 a hindi Fm station which aims at delivering new hindi songs can now be heard right away from your google talk.

All you have to do is to follow the steps below:

  • Open your Google talk and Sign in
  • After Signing In, click the add button and add this id service@gtalk2voip.com
  • After adding, add the second Id 110@radio.gtalk2voip.com
  • After completion of the steps above, make a call to the second id i.e call to 110@radio.gtalk2voip.com
  • Now you will directly be connected to Teen Taal Fm Station. (voice quality is average)

The first step of adding id would make you register the gtalk2voip service!

Other features of Gtalk2Voip:

  • Make calls from Google Talk, Yahoo or MSN to any mobile or landline phone (PSTN)
  • Make calls to other Google Talk, Yahoo! and MSN/Live Messenger users or SIP phones (SIP URI)
  • Create voice conferences with other Google Talk, Yahoo! or MSN/Live Messenger users
  • Send or receive voicemail from/to Google Talk, Yahoo! or MSN/Live Messenger users
  • Receive calls to your Google Talk, Yahoo! or MSN/Live Messenger from mobile or landline phones (PSTN) by using DIDs or via SIP Broker service
  • Receive calls from SIP phones, including Gizmo Project, InPhonex, SJPhone and others
  • Send SIP/SIMPLE instant messages to SIP phones

How it works?
Some of the services I mentioned above may be chargeable while they offer free incoming calls from sip phones to your gtalk, incoming call from PSTN to your gtalk, making calls to other IMs etc.

So now you get a free incoming SIP number, PSTN access number for Gtalk etc which you can add on to build your business widely.

Gtalk 2 voip also provides support for mobile platform with their specially designed application called Talkonaut which helps them to access and enjoy their voip services from their handheld.

Register now: Gtalk2Voip |

Make your face as your password

logo_banana_small.jpg

Have you ever wondered creating your own facial password like the matrix film or the Lenovo Advertisement? Well it’s time to make your own security system with Banana SecurityFacial recognition is not all about buying a high tech surveillance system but a simple webcam and some blocks of programs would help you build up your own face recognition security system.

How to setup your face recognition security?

By downloading Banana Screen software and with a good quality webcam, your security system is not far away. After installation, the program acts as a default authentication system for your computer requiring your facial expression to be your password.

How does it work?

BS collects your facial features by a webcam which is used to build a statistical representation of face and does stores it in binary format for execution and detection.  This spyware free program which gives a lot concern for your privacy stores your image in encrypted format meaning no third party programs can access it.

The backend of this program seems like it can support all webcams launched way back to 2 years but the application is still in beta stage. BS has released its version only for windows platform where Mac users have to wait a bit. I myself tried the program which sits lite in the system and unlocks quickly after showing my face but the cons is it doesn’t allow multi-user support as far now.

Links: Download BananaScreen | [via ThinkDigit]