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
Open a terminal (in Windows, Start -> Run, and then use cmd). Navigate to a directory where you would like to start a project. Then, use the path to the appropriate script, and execute one of the following: % zf create project quickstart.
The command: composer create-project -n -sdev zendframework/skeleton-application path/to/install always create a ZendFramework 3 app is their is a command to create a project of zendfrmaework 2.
You should open a cmd window and change directory to your project. You then need to type the following:
php composer.phar install
This will install all the library dependencies for the Zend Skeleton Application - ZF2 in this case.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With