How To Install Zend Framework 2 in xampp step by step?

Find the below new features in Zend Framework 2 (zf2).

Some highlights:

  • An entirely re-written event-driven MVC layer.
  • A powerful module management system.
  • Components practice dependency injection, supported by our Service Locator and DiC components.
  • An Event Manager, for writing event-driven systems, as well as for creating cut points in your software for introducing cross-cutting concerns.
  • A new view layer, architected around analyzing the request and generating a suitable response, be it plain old HTML, or Atom feeds or JSON.

Configure Virtual Host:

1) Go to C:\xampp\apache\conf\extra and modify httpd-vhosts.conf add below code:

<VirtualHost *:80>
DocumentRoot C:/xampp/htdocs/
ServerName localhost
</VirtualHost>
<VirtualHost *:80>
ServerName http://local.zend.com/
DocumentRoot C:\xampp\htdocs\zend\public
#ErrorLog "logs/dummy-host2.example.com-error.log"
#CustomLog "logs/dummy-host2.example.com-access.log" common
SetEnv APPLICATION_ENV "development"
<Directory C:\xampp\htdocs\zend\public>
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

2) Go to C:\Windows\System32\drivers\etc and modify the hosts file.

Since we are going to install Zend Framework on C:\xampp\htdocs\zend add the following line to the hosts file:

127.0.0.1  localhost
127.0.0.1  local.zend.com

3) Re-start the apache.

Below are the steps to install ZF2 in xampp/wamp.

1) Download the xampp server from apache website.

https://www.apachefriends.org/download.html

xampp


2) Install the xampp server wherever you like in your local directory.And the start Apache Serer
and Mysql service from the xampp control panel.

create-folder
3) Create the new folder in the directory and rename folder zend (whatever you like) in C:\xampp\htdocs\ or in your directory where you install the xampp.

createfolder

4) Download and Install the Composer from the link https://getcomposer.org/download

 

mpasswordchangequestion-300x150

During the installation of Composer the Path of php.exe should be provided.
phploc-300x234
In our case: C:\xampp\php\php.exe

5) Download and Install the GIT app from the link http://git-scm.com.

install-git

6) Right click the zend folder and click the Git Bash.
Enter the following address.
git clone git://github.com/zendframework/ZendSkeletonApplication.git
Then Press Enter.
Necessary file will be download in the folder ZendSkeletonApplication

skeleton

 

7) Copy the all the files and folder from ZendSkeletonApplication folder and paste inside the zend folder and delete the ZendSkeletonApplication.
(Moving the files from outside the ZendSkeletonApplication folder )

cut-300x231
8) Right Click the zend Folder and click the Use Composer Here.And Enter the following address:
C:\xampp\php\php.exe composer.phar self-update and Press Enter.
C:\xampp\php\php.exe composer.phar install and Press Enter.

OR (Use Below process in xampp and window 8/10)

Right Click the zend Folder and click the Git Bash Here and enter the following command :

composer install

get-composer
After above step necessary files are downloaded for development.

9) Now go the browser and enter the url http://localhost/zend/public or http://local.zend.com/

If you see above the installation is successful.
success

 

Be the first to comment

Leave a Reply

Your email address will not be published.


*