Before you get started Zend Framework 2 Installation, make sure that you have the following software installed:
- Servers: xampp or wamp server
- MySisGit: Git is needed to check out source code from various github.com repositories
- Enable your php_openssl Module From your php.ini File
- First Download and Install MySisGit with just Next Next….Next
To install a new Zend Framework 2, we will need to download the latest version of ZendSkeletonApplication and set up a virtual host to point to the newly created Zend Framework project. The steps are given as follows:
- Run Your MySisGit Software
- Navigate Server to folder location where you want to set up the new Zend Framework project:
- Write and Run Command in your git window for Clone the ZendSkeletonApplication app from GitHub:
$ git clone git://github.com/zendframework/ZendSkeletonApplication.git zf2
Install dependencies using Composer:
- Navigate zf2 folder location where you want install dependency using Composer, Write and Run Below Command to your Git :
$ cd zf2
- Update composer.phar from your zf2 folder , Write Below Command to your Git Software
<b>$ php composer.phar self-update
- Install composer.phar from your zf2 folder, Write Below Command to your Git Software
$ php composer.phar install
So now we have the Zend Framework installed. A couple of things to left we will do it now. As we always add any site I created into my server I customize it to v-host, so that it will works like a real site with write and view protection as like server. So we will do it now.
- Open this file C:\xampp\apache\conf\extra\http-vhosts.conf
- Add the following lines to the file, while ensuring you have the first line in there!
<VirtualHost *:80> ServerName zf2 DocumentRoot C:\xampp\htdocs\zf2\public SetEnv APPLICATION_ENV "development" <Directory C:\xampp\htdocs\zf2\public> DirectoryIndex index.php AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
- And also add this if you already do not have this, this will give access to the localhost as usual
<VirtualHost *:80> ServerName localhost DocumentRoot C:\xampp\htdocs SetEnv APPLICATION_ENV "development" <Directory C:\xampp\htdocs> DirectoryIndex index.php AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
Now restart the apache by Xampp control panel stop and start again.
Finally Open c:\windows\system32\drivers\etc\hosts and add this line at the last
Now just open your browser and type http://zf2 you will see the ZF2 welcome screen. Good luck 🙂
Install Zend Framework 2 Step by Step Using Windows MySisGit Software
Hi, My name is Masud Alam, love to work with Open Source Technologies, living in Dhaka, Bangladesh. I’m a Certified Engineer on ZEND PHP 5.3, I served my first five years a number of leadership positions at Winux Soft Ltd, SSL Wireless Ltd, Canadian International Development Agency (CIDA), World Vision, Care Bangladesh, Helen Keller, US AID and MAX Group where I worked on ERP software and web development., but now i’m a founder and CEO of TechBeeo Software Company Ltd. I’m also a Course Instructor of ZCPE PHP 7 Certification and professional web development course at w3programmers Training Institute – a leading Training Institute in the country.