How To Install Zend Framework On Wamp Server In Windows

How To Install Zend Framework On Wamp Server In Windows

As PHP is growing day by day very fast, everyone wants to learn it’s frameworks and open source cms. Zend Framework is one of them and most of the people try to work on it but the common problem of all Zend dummies is that How to install Zend Framework in their computer first? When I was installing Zend Framework, I searched a lot on the internet but couldn’t found any perfect solution of that because all the tutorials or instructions for Zend Framework set up available on the internet were not understandable in an easy way for beginners. After all one of my colleagues told me the exact steps to install zend framework in windows XP.

Install Zend Framework On Wamp Server In Windows

At the writing time of this post, I used Zend Framework 1.12.0 and this is the best suitable version for the dummies, who are trying to learn Zend Framework.  In this tutorial I have taught about Zend Framework installation with command line tool and I make it very clear that don’t try to set up Zend Framework only by seeing the screenshots that I’ve attached here. Please read the full article and follow every step to install Zend Framework on Wamp Server in Windows XP properly.

Basically Zend Framework can be installed in two ways. First one is installation with command line tool that is called a standard way and second is only a simple trick. The major difference between both installations is very clear. By installing Zend Framework with command line tool , you can use the Zend library in multiple projects simultaneously and you don’t need to put the Zend library folder in each zend project. You need to put the library folder only in your project when it is finished and uploaded to the remote server only.

Zend Framework installation with command line tool is the standard way that reduces your project size and allows you to create multiple Zend Projects in the same workspace with same Zend library. Zend provides a .bat file to run the command which creates the whole Zend Framework Project architecture in your work space so you don’t need to create all Zend folders manually in your root folder. Another way of Zend Framework installation is to simply put the library folder only in your zend project and you have to create all the folder structure of Zend Framework manually for your project.

Just go through the following steps to install Zend Framework and Set up a proper Zend environment on your local wamp server:

1. Download Zend Framework Package:

Zend has recently released Zend Framework 2 beta version that can’t be installed with both command line tool and by replacing the library folder only. It is installed with another technique that is called application skeleton. So I suggest you to download Zend Framework 1.12.0 Minimal Package at the beginning level. The difference between minimal and full package is only Zend Framework demos. Zend Framework full package has some useful demos for the dummies and minimal package has only the standard Zend library. But you should download only the minimal package in my thoughts. Click here to download Zend Framework 1.12.0 minimal package.

2. Put the downloaded Zend Framework at right place:

Now extract the downloaded Zend Framework Zip package in your php folder of wamp (wamp\bin\php) and rename it as zend_framework (its depends on you whatever you rename). Your folder structure should be as shown in the following screenshot.

3. Include Path in php.ini:

To use the Zend Framework Library globally in all zend projects, you have to include the path of your library folder in php.ini file. Now open your php.ini. If you don’t know the exact location of this file, you can open it by wamp tray icon present in task bar. Find the line “include_path” in this file. Have a look at the following screen shot. You will automatically understand that what you have to do.

After finding the line “include_path” you will be seeing some following lines:

; UNIX: “/path1:/path2″

;include_path = “.:/php/includes”


; Windows: “\path1;\path2″

;include_path = “.;c:\php\includes”

Just remove the semicolon of last line and change it as

include_path = “.; D:\wamp\bin\php\zend_framework\library”

In my case the wamp server is installed in D: drive so I used here D:\wamp. Change it according to you in which drive you have installed your wamp server. Save the file restart wamp server. Your php.ini should be look like following:

4. Modify your System Environment Variables (Path Variable):

Actually Zend provides a zf.bat file in the Zend Framework Zip Package that you downloaded. When this bat file is run through command prompt, it creates the whole architecture of a zend project folder wise in your workspace. To run this file, you have to add the path of your php installation directory ( D:\wamp\bin\php\php5.3.5 in my case ) and your zend framework bin directory ( D:\wamp\bin\php\zend_framework\bin in my case ) in the path system variable. To do this, open your “ My Computer Properties ” and go to “ Advanced ” tab. Now click on “ Environment Variables ”. Add the system environment variables as shown in the below screenshot.

5. Create A Zend Project with Command Prompt:

Your Zend framework has been installed perfectly if you’ve followed the above steps properly. Now it’s time to create a Zend project with command line tool. Just open your command prompt (CMD) and run the command “zf” in it. When the command finishes successfully then again type “ zf create project zendy ” (zendy is my project name you can take another as you wish) and hit enter. Finally your Zend project has been created in the location where you run the command. If you want to change your project location, just change the path in command prompt then run the command “zf” and after it again run the project  command “zf create project projectname”. After creating the project successfully you will see the following Zend project folder structure.

6. Make a Virtual Host in Apache http.conf file:

You have successfully created your zend project and it can be run using the url http://localhost/zendy if you run the command in the directory D:/wamp/www/ but if you created your project in another workspace such as my documents or something else then you will be no longer able to run your zend project through above url. In this situation you have to make a virtual host on your Apache server . So it would be better to make a virtual host in wamp server to run your project either it is created in www directory or in something else. To make a virtual host, just open your httpd.conf files placed in (D:\wamp\bin\apache\Apache2.2.17\conf) folder and add the following lines at the end of file.


DocumentRoot ” D:\wamp\www\zendy\public”

ServerName zendy

<Directory “ D:\wamp\www\zendy\public”>

AllowOverride AuthConfig FileInfo Indexes Limit Options

Order Deny,Allow

Allow from all



“D:\wamp\www\zendy” is the location of your new zend project which you created in the command prompt. It may be on another location depends on you, what path did you use when you run the command “zf create project zendy”.

7. Register Virtual Host in windows hosts list:

Open a file “hosts” with notepad which is placed in the folder (C:\WINDOWS\system32\drivers\etc). You may see the last two lines in this file as       localhost       localhost

Remove one of them and change another as       localhost zendy

Now your project can be run by typing “zendy” in the browser only. You don’t need to add localhost in this url now because you have already registered this project as a virtual host in windows hosts list.

Finally you have successfully created a Zend Framework environment on your Wamp Server in Windows XP. To set it up in windows 7 Just search the proper place of system environment variables and modify them as above. So that’s was How to install Zend Framework On Wamp Server in Windows PC .

4 Responses to “How To Install Zend Framework On Wamp Server In Windows”
  1. thanks for sharing, i am having trouble in installation of zend framework on the server.

  2. Usman says:

    i am looking for zend framework on the server thanks a lot

  3. Ashit Kumar says:

    Very helpfull solution to install zend framework

  4. jayson says:

    Hi, i wonder? where did you get you zendy file as your project?