A comprehensive guide: How to install Zend Famework
The frameworks help programmer to build an application rapidly and efficiently while decreasing the security issues. Today I am going to install and configure Zend Framework which is one of the most powerful PHP framework that is being used around the globe. Magento, the most famous e-commerce CMS, is also build with the Zend Framework. Learning Zend Framework will help you understand Magento also and you will be able to code for Magento as well.
First of all you can download the latest version of Zend Framework from the link framework.zend.com/download/latest. You can also download the documentation here that will help you with development.
The advance developers can also get the latest release from SVN. To get the latest release using SVN download the Tortoise SVN from here and checkout form the link: http://framework.zend.com/svn/framework/standard/trunk
For Newbie to SVN: Install the Tortoise SVN create a new folder, right click on it and select SVN Checkout enter the above URL in URL of repository field and click OK.
Once you have downloaded the Zend Framework make sure you application be able to access frameworks classes. To accomplish this there are many ways to accomplish this. Your PHP include_path needs to contain the path to Zend Framework’s library. You can find the PHP include_path in php.ini file just change the following lines as bellow:
; Windows: “\path1;\path2″
include_path = “.;E:\xampp\php\pear\;E:\xampp\frameworks\”
Note: I added a folder “frameworks” and put the zend library in this files.
Important Configurations:
You need to set two environment variables one for php.exe that is located in PHP folder and the second one for the zf.bat (For windows). To do this go to the Computer Properties and add these two paths. In my case I have added two following path. See screen shot.
- E:\xampp\php
- E:\xampp\frameworks\zend\bin
Note: Adding the path info in environment variables will enable you to run Zend commands form the Command Line.
Build your first application:
After successfully adding the the path info in PATH environment variable you can test by executing the following command in DOS
zf show version
If the following command shows you the Zend version then you have done all successfully. You can get help of of the command line tool by executing zf --help
. This will show you all the possible command and parameters.
Now in DOS navigate to the directory where you want to create your new project and execute the following command:
zf create project first_zend_project
The above command will create and directory “first_zend_project” and will create all the necessary files and you can now start coding.
In the next post i will tell you how to configure your project and what tools there are that could help you in programming and make your life easy. So keep visiting my blog
thanks jani very helpfull
Hmmm this post is very interesting. I’ll use it for my essay . Can you tell me some related articles that I can read too?
Hey thanks for yet another nice and interesting post. Where do you get your inspiration for all this ? – Tilburg
Thanks for such appreciation. The best material you can find about Zend Framework is its official documentation. You can consult it to learn more.
For some folks its hard to understand that documentation so I just tried to convey in an easy way.
You suggestions and critics are welcome all the time :p
Find and pick some good things from you and it aids me to solve a problem, thanks.
- Henry
Great Post!! Thank you very much!