Zend Framework2 Installation Steps
ZF2 Installation steps
Zend Framefork2Firstly know your php version by writing php -v on cmd
If console shows something like this “php is not an internal or external command” then
For that you need to set environment variables
Steps-
a)Right click My Computer->Properties->advanced->Environment Variables->Search for path add this line
;c:\xampp\php
Again write php -v If php version <= 5.3.1 then you have to upgrade php to version > 5.3.1
Steps Of Installation
1)Upgrade php to > 5.3.1
2)Better option reinstall xampp
xampp-1.8.3
php-5.5.6
3)download Zend skeleton from github from the following link
https://github.com/zendframework/ZendSkeletonApplication
4)Configure Virtual Hosts for your zend2 skeleton you downloaded in step 3.
For those who dont know how to set up virtual hosts
In Short
Go To xampp/apache/conf/extra/httpd-vhosts.conf
##<VirtualHost *:100>
##ServerAdmin postmaster@dummy-host2.localhost
##DocumentRoot “C:\zend2\public”
##ServerName dummy-host2.localhost
##ServerAlias http://www.dummy-host2.localhost
##ErrorLog “logs/dummy-host2.localhost-error.log”
##CustomLog “logs/dummy-host2.localhost-access.log” combined
Similarly go to xampp/apache/conf/httpd.conf
listen 100
<VirtualHost *:100>
DocumentRoot “C:\zend2\public”
ServerName localhost:100
DocumentRoot “C:\zend2\public”
<Directory “C:\zend2\public”>
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
5)First time when you will run your application skeleton it will ask for composer
For that just follow these steps
a)Open cmd
b)Browse to the location of application
c)run the following 2 commands
php composer.phar self-update
php composer.phar install
- Official documentation - has useful stuff – especially the view quick start
- View Layers, Database Abstraction, Configuration, Oh, My! - Good intro to View Layer & Db
- Getting started writing ZF2 modules - Good intro to modules
- Modules in ZF2 - Another intro to modules
- Using the ZF2 EventManager - introduction to event manager
- PHP Constructor Best Practices And The Prototype Pattern - Zend\Db\ResultSet uses this
- Learning About Dependency Injection and PHP - Useful background for Zend\Di
- An introduction to Zend\Di - Intro to using Zend\Di
- Matthew Weier O’Phinney’s ZF2 articles
- Rob Allen’s ZF2 articles