Pages

Wednesday, December 5, 2012

Zend framework for beginners

1. Installation(For windows)

Step-1

The First Basic step is to download the Zend Framework Package itself. You can Download the Package from here. Please make sure this should be a full package

Step-2


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 = ".;D:\xampp\php\PEAR
Now include the path where you have extracted the Zend Framework, so the above line changes like below
include_path = ".;D:\xampp\php\PEAR;D:\xampp\htdocs\samy\ZendFramework-1.12.0\library"
and Close the php.ini file.

Note: If you done this, then no need to set the dynamic include path at application's index.php file

 Step-3
 Needs to set the environment variable for notifying the bin installers(zf.sh,zf.bat)Create either a System or User Environment Variable with the following
 variable-1
Variable Name: ZEND_TOOL_INCLUDE_PATH
Variable Value: D:\xampp\htdocs\samy\ZendFramework-1.12.0\library
 variable-2
Variable Name: PATH
Variable Value: D:\xampp\htdocs\samy\ZendFramework-1.12.0\bin;D:\xampp\php
 You can set the environment variables in windows using following way
start>mycomputer>right click>properties>advanced system settings>Environment variables>

here we can add/edit the variables
if variable name is already exist then apend the values with ";"

Step -4

After setting the paths restart the system and access the command prompt

start>cmd
c:>
D:\xampp\htdocs\samy> php -v
 It will display the php version

D:\xampp\htdocs\samy> zf show version
 It will display the zend framework version

D:\xampp\htdocs\samy> zf create project zend_demo
 It should create the new project with folder structure, you can see the folders at below path

 D:\xampp\htdocs\samy\zend_demo
In this folder structure "library folder" doesn't have any files/folders inside it
so copy the full library files from downloaded package( click here to download) and paste it here

No comments:

Post a Comment