Search This Blog

Setting Up Zend PHP Framework

Not like CodeIgniter or CakePHP that run out-of-the-box, you need extra work to get Zend Framework run on your devs server. In this example, I set up Zend on Windows XP box with XAMPP, and Zend v1.11 Full version.

 Before you read further...
-my XAMPP installation folder is C:\xampp
-my Zend Framework folder is D:\WEB_PROJECT\ZendFramework-1.11.10

a) I create new folder WEB_PROJECT on D: partition, and put Zend on that development location.
Directory structure of development folder.
b) Next, you need to set up environment to point zf tool to for fast project creation, debugging and so on.
1. Go to Start > right clik on My Computer, select Properties
2. Select Advance tab, select Environment variables
3. On System Variables, select Path then click Edit
4. Add ;D:\WEB_PROJECT\ZendFramework-1.11.10, then click OK
5. Click OK on Environment Variables window, then click OK again on System Properties window, restart your Windows XP to take effect

Test your configuration from DOS comman line by typing: zf -- help
c) Configure apache virtual host, edit file C:\xampp\apache\conf\extra\httpd-vhosts.conf as follow:

d) On your DOS prompt go to dev folder, then execute command: zf create project quickstart
Project created

e) Edit Windows XP DNS file to point our virtual host, go to C:\WINDOWS\system32\drivers\etc edit file hosts
Edit Windows XP DNS resolver
f) Add Zend library into PHP include_path, go to directory C:\xampp\php, open php.ini with notepad.find this line:  
include_path = ".;C:\xampp\php\PEAR"
edit to
include_path = ".;C:\xampp\php\PEAR;D:\WEB_PROJECT\ZendFramework-1.11.10\library"
g) Resatart your Apache

Time for testing, open quickstart.local on your browser
Our first project successfully created, and Zend ready for next development

You may download Zend Server CE for minimal configuration. But I suggest you try this a little complex configuration to give you more understanding on how to develop PHP app with Zend.

I hope it useful :)

share and comment


Related Posts :