Install Zend Framework 2 In Wamp Server on Windows

By

February 13, 2013PHP19 Comments

Install Zend Framework 2 In Wamp Server on Windows

I’ve written one another article about installing zend framework 1.12 in wamp server on windows. But before some time zend has released its new version zend framework 2.1.1 that is not has the same installation process as its previous version. Although Zend Framwork 2 installation is much easy than version 1.12 but people don’t know that where to start. I’ll not take your too much time to explain it. Just move to following steps and get installed zend framework 2 on your windows system. For linux (Ubuntu) system, I’ll write another tutorial.

Install Zend Framework 2 On Wamp Server

Step 1: Download Zend framework 2 Application Skeleton:

Actually Zend has released an application skeleton of zend framework and uploaded it to their Github repository. This application skeleton automatically installs Zend framework 2 on your computer by using composer tool. So first you need to download this application skeleton from github repository. Download it from the github link https://github.com/zendframework/ZendSkeletonApplication

Download Zend Framework 2 Application Skeleton From Github

Step 2: Extract It In Wamp/WWW And Rename It:

Extract the downloaded zip file of skeleton in your wamp/www directory and rename it according to you. In my case, it is “zendy”.

Install Zend Framework 2

Step 3: Run Composer In Command Prompt:

If you don’t know about composer then I tell you what exact composer  is? Composer is a PHP dependency management tool that enables you to declare any appropriate PHP library for your project and installs them in your project by command line. So before using composer, just check weather it is installed in your computer or not. Open command prompt and type “composer” and hit enter. If you’ve installed composer in your computer, you’ll see the following image otherwise you’ll get unrecognized command message.

If composer is not installed, you’ll see the following image:

If composer is not installed

Or if composer is properly installed in your computer:

If composer is installed properly

If  you don’t have composer installed in your computer, then first download it from http://getcomposer.org/download/ for your windows system and install it like other software. It is approximate of 550 KB.

Installing Composer

After installation it will automatically creates the system environment variables in your computer so you can run the command “composer” from any directory in your command prompt. After installing the composer again type “composer” in cmd prompt and you’ll see the command prompt image shown above.

Step 4: Install Zend Framework 2 Using Composer:

Now reach at your extracted zend directory that you downloaded from github. In my case it is D:/wamp/www/zendy. May be different in your computer. After reaching this directory, run the following two commands one by one.

php composer.phar self-update
php composer.phar install

After running both the commands successfully, you’ll get the following image.

Install Zend Framework 2 On Wamp

Step 5 : Run Your Zend Framework Project In Browser:

Congratulations, you’ve installed zend framework2 successfully in your wamp server. Restart your wamp server and open your browser and type http://localhost/zendy/public (in my case it is zendy and may be different according to you). You will get the Zend Framework Welcome page if your it has been installed successfully.

Step 6: Create Virtual Host:

If you want to run your zend framework project with appropriate local domain name,  you have to make a virtual host for your project. I’ve told in my post http://blogaddition.com/2012/12/create-virtual-host-in-wamp/. You can read it.

Enjoy!!!

19 Responses to “Install Zend Framework 2 In Wamp Server on Windows”
  1. ravi sankar says:

    Thanks man!! The power of simplicity.

  2. aldwin says:

    Hey man,

    i’m getting this error..i follow correctly the instructions.
    why i’m getting this error?..pls help.

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, admin@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

  3. Prasanna says:

    Hi,

    Great Article..
    Saved lot of time for me …. also many out there..

    Also pls write a simple webs application development in ZF2 with crud functionalities

    Advance Thanks
    Regards
    Prasanna

  4. Mastbobby says:

    Thanks for your nice post. I hope it will be a good starting point for the newbie. I suggest you to write an article that is the next step to the installation and then provide a sample application develop using Zend Framework 2.0.

    I have tried to search any book or training over the internet and found no updated books on ZF 2.0 but there are lot of books available on the previous version of ZF. And there is a lot of change in the ZF 2.0 and I think starting with the old version is not good as to start with ZF 2.0

    Best of Luck for all efforts that you have put in to help the ZF 2.0 community.

    Thanks,
    Bobby.

  5. jasmin says:

    I have problem dude.. when i install composer… it downloads composer.phar.. and after that it shows error message of “openssl ” problem.

    I have checked out PHP>extentions>php_openssl then also. it’s shows the same problem
    first command(php composer.phar self-update) is working successfully but
    second is not working

    give me solution

    • What’s the exact problem it shows and which server have u installed on your system i mean xampp, lampp or wampp or configured manually all servers???

    • Pranay says:

      Hi Jasmin,

      I also faced the same problem.

      In my case wamp was showing openssl ext enabled
      but when i actually gone through the path: wamp\bin\php\php5.3.5\php.ini
      and open php config file it was commented.

      Please remove the comment -> ;extension=php_openssl.dll

      Like this-> extension=php_openssl.dll

      and save file.

      Don’t forget to restart the wamp server.

      Thank’s Manish for great post!!!

  6. sridhar says:

    WHen i am trying to write this command (php composer.phar self-update) in my composer its giving me one erroe like this “could not open input file” any help please

    • Pranay says:

      Hi Sridhar,

      Have you install composer properly as per step number 3?

      and check one thing which mentioned in step 4 that is your project folder path as follows:

      Step 4: Install Zend Framework 2 Using Composer:

      Now reach at your extracted zend directory that you downloaded from github. In my case it is D:/wamp/www/zendy. May be different in your computer. After reaching this directory, run the following two commands one by one.

      php composer.phar self-update
      php composer.phar install

      Thanks,

  7. David says:

    Thank you very much !

    I get a little problem with the open ssl but I just go to wamp\bin\php\php5.3.5\php.ini and remove the ; in front of extension=php_openssl.dll and it works perfectly.

    Thanks,

    David

  8. Rafael A. says:

    Thank you very much Manish!

    I’ve found your post more than excellent! Good job!!

    Regards.

    Rafael Aranda.

  9. Milad says:

    Why can’t they Just say these things in first place!
    Thanks dude.

  10. Pawan says:

    when I run command php composer.phar install
    it download file to 100% and row invalid zip archive

    what to do?

  11. Thanks for sharing such wonderful article :)
    Keep your site updated.

  12. jaywant says:

    Thank you very much Manish!

    I am new developer in zframe work.
    Thanks to posting such wonderfully blog.
    Please post how to create application in zend

    Thanks

  13. Satish says:

    Very good post…
    I have seen many posts about zend framework 2 installation..this is the best one among them…
    Thanks for this post…
    keep posting…

  14. jamie says:

    Hi your post is great. I followed all the things and completed successfully.
    I have following questions
    1) what is the use of virtual host if i am not able to see it on internet as in your case
    http://www.site1.com
    2) I am new to zend framework how to work on it? I just land up on start page of Congratulations screen even after exploring it. What to do after that?

Leave a Reply

Manish Jangir - Find me on Bloggers.com