i am creating my first application in zf2. i followed Zend Offical website zf2 Skeleton Application.i have downloaded the skeleton app from github as in in the given link.when i extract it and put that in my folder and run it its showing this Fatal Error
Fatal error: Uncaught exception 'RuntimeException' with message 'Unable to load ZF2.
Run `php composer.phar install` or define a ZF2_PATH environment variable.' in
D:\projects\zf2\zf2_app\init_autoloader.php:50 Stack trace: #0 D:\projects\zf2\zf2_app
\public\index.php(9): require() #1 {main} thrown in D:\projects\zf2\zf2_app
\init_autoloader.php on line 50
i dont know How to fix this??
and what about this?
To install Zend Framework 2 into our application we simply type:
php composer.phar self-update
php composer.phar install
where to type these commands? Help me with my first ZF2 app
In addition to Rob Allens answer i have good responses so far from Windows User who have less experience with the command line.
You may find my blog helpful, too: Zend Framework 2 installation on Xampp for Windows
its seems like you have not Downloaded the zf2 :) download it from here http://framework.zend.com/downloads/latest#ZF2
extract the framework to vendor/ZF2. and you done :) now browse to your app hope it showing No Exception.
As you have already downloaded the GIT file Below commands are for windows :
1) Go to the respective folder 2) run the command -> composer update 3) That should let you install and choose optional modules 4) Finally -> php -S 0.0.0.0:8080 -t .\public .\public\index.php
With this you should be able to access the index page at http://localhost:8080/
How about making it easier @Rob Allen? When answering, so that other reader can save 24 hours to 1 minute !! I tried to make it easier from your answer as below:
You may want to follow the following steps:
Download ZF2 Skeleton Application from Github.
Change directory where you want to install, and unzip the skeleton application.
Change directory to "ZendSkeletonApplication-master", and run the following:
php composer.phar self-update
php composer.phar install
You should open a cmd window and change directory to your project. You then need to type the following:
This will install all the library dependencies for the Zend Skeleton Application - ZF2 in this case.