Prerequisites
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
Step 1:
- First Download and Install MySisGit with just Next Next….Next
Step 2:
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
Step 3:
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
Step 4:
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
127.0.0.1 zf2
127.0.0.1 localhost
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.
It’s nice and good and it’s better then the previous tutorial.
Masud vai I want to write about zf2. I think I can start with simple CRUD with zf2. I’ve a profile in w3programmers. the user name is : mahmudbd1000. Please let me write… thanks
Welcome, I already assigned your username as an author
Thanks brother. I’m very happy to do this.
While I write the command php composer.phar install it shows RuntimeException – You must enable the openssl extension to download files via https – what is the solution of this?
For virtualhost code- should I add those two code fragments with the existing codes or should I make new blocks.
Thanks.
Ratul
To enable openssl- 1. go to your xampp control panel
2.Click config of Apache 3. Find an cllick php( php.ini) from the list 4. Find out (Ctrl+f) ;extension=php_openssl.dll 5. Just remove the ” ; ” from the beginning. 6. Save , exit and restart your xampp. Hope you can now install ZF2.
For Vhost code – copy the code from here and just paste it at the bottom of that file. Keep in mind to save that file you have open that file as administrator. Thanks.
Really it is great
Really Nice
nice