I am working on WAMP (Windows Apache Mysql PHP) Server and found some difficulties to setup Zend Framework environment. You may found some difficulties in installing the zend framework, that’s why I have written this article, hope you will found find this article helpful.
Suppose you have WAMP installed on C drive (C:/wamp)
There are some basic requirements for setup:
1: Php version should be greater than PHP 5.2.x
2: Load mod_rewrite Rule: Web Server (Apache) supports mod_rewrite rule to support .htaccess file. so to load this module, in Apache folder there is httpd.conf file (C:/wamp/bin/apache/Apache2.2.11/conf/)
#LoadModule rewrite_module modules/mod_rewrite.so
Uncomment it (means remove “#”)
3: Download Framework: Download ZendFramework archive. It can be download from http://framework.zend.com/download/ in a .zip or .tar.gz format and extract it.
4: Setting Up Zend Tool: Create a new directory on Programe Files named as “ZendCli” and paste library and bin folder to this directory extracted from ZendFramework archive.
5: Add the bin directory to Environment variable: On computer properties advance options there is PATH variable.
Add ;C:\Program Files\ ZendCli \bin
To execute php on CLI (Command Line Interpreter) mode, add php to environment variable
Now Reboot the System to set all environment variables.
6: Testing Zend: To test your installation open a command prompt and type
zf show version
if all work fine, your should see
Zend Framework Version: 1.10.0
If not, then check all the path and bin directory, once zf tool is working. We have all zf command available and can start working on Zend framework.
7: Now open a command prompt, traverse to your root directory and type
zf create project zfPrj
this command will create a directory structure for working on framework as shown in figure below:
This figure illustrates the structure of Zend framework. application directory is where the source code is available, public folder is where the website executes.
8: The last work is to copy the library/zend/ directory from Zend archive to our application zfPrj/library. After doing this browse this URL http://aloksah.org/zfPrj /public/
Getting this screen on your browser means all is fine and we can now work on application.