jump to navigation

How to Initialize a Zend Project on wamp March 28, 2011

Posted by Tournas Dimitrios in Zend Framework v1.10.

The Zend Framework is an open source framework for developing web applications and services with PHP5 , based on simplicity , object-oriented best practices , corporate friendly licensing and a robust well-tested code base . This article is just a quick how-to initialize a Zend project from the terminal window on a Windows XP box . I assume that you already have an PHP / Mysql development environment on your local machine , for example Wamp .

First download  the latest Zend Framework to your development environment . Visit the official Zend Framework Web site and get a copy of the most recent release of the software ( v. 1.11) . Zend Technologies makes two versions of the package available :

  • A minimal version , which contains just the standard libraries and command-line tools
  • A full version , which contains additional documentation , examples , unit tests and third-party toolkits . I recommend the full version .

Once you’ve downloaded the code archive , extract its contents to a directory of your file system , let’s say “C:\my_php” . You should end up with a directory structure that contains the libraries , demo , bin and documentation . The library directory contains all the Zend Framework components , while the bin/ directory contains command-line tools that are helpful in initializing a new project and adding objects to it .Two important things has to be done :

  1. The library/ directory should be set as an reference in your PHP include path list in the php.ini file . Open you php.ini file and find the directive include_path , now append your Zend’s library/ directory [include_path = “.;c:\php\includes;C:\my_php”]  . Restart your Wamp server .
  2. The bin/ directory should be set in the computer’s executable path .
    Right click “my computer icon ” -> properties ->advanced -> Environment Variables -> System Variable window select “Path” -> edit -> at the end of the line append the location of your Zend bin/ directory  ” ;C:\my-PHP\Zend\bin ” . The semicolon must be included .
  3. Enable “rewrite ” directive on httpd.conf file ( un -comment by removing the “# “)
    LoadModule rewrite_module modules/mod_rewrite.so
  4.  A good practice is to apply virtual hosts on your development environment

The bin/ directory contains three scripts : zf.sh , the command -line interface for Linux ; zf.bat , the command -line interface for Windows ; and zf.php the main “worker” script .

You are almost there !!! .  Open a terminal window and move to your web’s root directory

  1. cd  C:\Program Files\wamp\www\
  2. zf  create  project  test-project

That’s it  , your web’s root contains a Zend project with the name of “test-project ” . Navigate with your browser to : http://localhost/test-project/public/

Happy Zend coding🙂


1. Mai Kortz - April 24, 2011

Someone essentially help to make seriously articles I would state. This is the first time I frequented your website page and thus far? I surprised with the research you made to create this particular publish extraordinary. Fantastic job!

tournasdimitrios1 - April 24, 2011

@Mai Kortz
I’m glad it helped you .
My future plans are to publish similar articles .

2. Salina Labarbara - April 25, 2011

I continually visit your blog and retrieve everything you post here but I never commented but these days when I saw this post, i couldn’t stop myself from commenting here. great mate!

3. Domenica Scannell - April 26, 2011

I can’t remember much how i got right here, but boy oh boy I really didn’t need to hesitate and browse a few of your items, they’re all right works of writing and very much great opinions on just about this particular hard subject. Rock on my good friend.

4. Milo Courrege - May 7, 2011

Greetings! I know this is kinda off topic but I was wondering if you knew where I could find a captcha plugin for my comment form? I’m using the same blog platform as yours and I’m having trouble finding one? Thanks a lot!

tournasdimitrios1 - May 8, 2011

@Milo Courrege
My WordPress.com provides me a nice free build-in spam filter ( Akismet ) . Although some comments are market as span , I can un-mark them . I’m totally satisfied , so there is no need to search for an alternative solution . Usually Goooooooogle is my valuable friend , when I need help .

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s