How to Install the Zend Framework in Windows Vista for a Web Developer CodeUnit 11 MAR 2011

If you already have a web development environment set up on your machine and don’t necessarily want to run the whole Zend Server package and instead just want to create Zend projects using the Zend Framework, then this simple how to install Zend Framework tutorial should be perfect for you.

Step 1) Grab Zend Framework

Download the latest version of the framework from and unzip it to where you want it installed/located on your machine.

Step 2) Set up System PATH Variable

Add the newly extracted Zend Framework package to your system PATH variable: In VISTA right click on the Computer (My Computer) icon and click on the Advanced System Settings link under the tasks menu on the left. At the bottom of the resulting System Properties dialog will be a button that reads Environment Variables. Click this.

Browse through the list of Variables under the System variables section of the Environment Variables dialog. If you already have a PATH variable, click Edit. If you don’t click on New. Variable name should be set to PATH. The value should be set to the folder in which you extracted the framework: e.g. C:ZendFramework-1.11.4bin

Note that while you are here, you may as well check if your PHP bin directory (basically the directory containing php.exe) is listed under the PATH variable. If not, add it. Mulitple locations can be defined under the PATH variable, using semi-colon ‘;’ to delimit them: e.g. C:ZendFramework-1.11.4bin;C:xamppphp

To test that this has been done correctly, open a command prompt (Windows button->Run…->cmd) and type in zf. If it complains about zf not being an executable, then your path setting is wrong. If it works, you’ll get some help information from the zf command.

Step 3) Generate Zend project

Now to generate your Zend project. Still in the command prompt, browse to where you want to create your project: e.g. cd c:vhostszend-projects. Now, enter:

zf create project MyProjectName

where MyProjectName is the name of your Zend project. This should generate a folder structure under c:vhostszend-projectsMyProjectName that will contain all the necessary Zend folder/file structures necessary for your work. For example, you should see folders under the root like application, library and public.

Note that sometimes this process doesn’t properly generate the necessary library contents. To get around this, go to the folder in which you originally extracted the Zend Framework to, locate the library folder in its root and copy its contents to the library folder under your project’s root.

Step 4) Set up Virtual Host

Locate your Apache2 httpd-vhosts.conf file. If it isn’t using a separate file to maintain its list of virtual hosts, then locate its httpd.conf file. In it, you need to add the virtual host information for your new project. Locate the section dealing with virtual hosts and add the following:

<VirtualHost *:80>
DocumentRoot c:/vhosts/zend-projects/MyProjectName/public
ServerName  MyProjectName
<Directory "c:/vhosts/zend-projects/MyProjectName/public/">
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all

Save your .conf file and restart Apache2.

Step 5) Edit Your hosts File

Finally, we just need to edit our Windows host file so that we can work on our project. Locate and open in notepad (PSPad is my favourite) C:windowssystem32driversetchosts. Add the following line and save: MyProjectName

Step 6) Test Installation

And we’re done. If you now hit http://MyProjectName/ from a browser you should be presented with a Zend Welcome splash page. (If you are presented with a failed to open stream error, remember the library contents note I made in step 3.)

Nifty – or should that rather be, Good Luck!? :)

Related Posts:

About Craig Lotter

South African software architect and developer at Touchwork. Husband to a cupcake baker and father to two little girls. I don't have time for myself any more.

  • Umeshblader

    thank you for your valuable instruction about to install and manipulate zend project first time. I searched everywhere on internet and i found best source from here. I hope that your service become best favor to all.

  • Hi Craig,

    Thanks for your good tutorial, I follow your all steps.
    At last I got an “Internal Server Error”. I try to
    avoid same by copying the library files content in project,
    but no hope. I am still get same problem .. I use
    Windows 7 Professional, ZendFramework-1.11.7 and wamp version 2.1.

    now when i give http://localhost too get same “Internal Server”

    Error . So I remove


    DocumentRoot H:ZendAnespublic
    ServerName  ZendAnes

    DirectoryIndex index.php
    AllowOverride All
    Order allow,deny
    Allow from all

    then that is work fine , but not my project page. Do you
    please advise me to where I make changes in apache httpd.conf
    file … Please reply me in ASAP.

    Anes P.A

    • Hi Anes

      Sorry, I’m not familiar with Windows 7. I know things change slightly
      because of their tighter access controls on the various folder structures.

  • Samith Joshi

    Hi Craig,

    Thanks for your good tutorial, I follow your all steps.
    At last I got an error.


    You don’t have permission to access /
    on this server.”

    So Plz tell me how to remove this error