0
votes

I am trying to int Zend framework 2. I aready have xampp running. I followed the steps on this answer. How ever when I visit the url I specified I get the following descriptive 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 C:\xampp\htdocs\ZendSkeletonApplication\init_autoloader.php:51 Stack trace: #0 C:\xampp\htdocs\ZendSkeletonApplication\public\index.php(18): require() #1 {main} thrown in C:\xampp\htdocs\ZendSkeletonApplication\init_autoloader.php on line 51

as the exception states. I went on to run the command php composer.phar install and nothing happens. nothing displays on th cli to showing anything being installed. and when i run again application i get the same error. Where else can I look and check for errors. Thanks I am using PHP Version 5.6.8

2
By 'nothing happens', do you mean it hangs, or completes with no output? Make sure you are in the application root when you run that command (C:\xampp\htdocs\ZendSkeletonApplication in your case). Try php composer.phar --version, php composer.phar --help to see if they give you anything. Might also be worth adding your php version to you question: php -vTim Fountain
@TimFountain It completes with no output. I did run the commands you suggested and still no output. I have version 5.6.8. Thanks.lee
Howabout php composer.phar -vvv install?Tim Fountain
still didn't come right. But got it to work after starting afreshlee

2 Answers

1
votes

So what worked for me. I began again from scratch following the tutorial here

Then I still got a "could not open input file: composer.phar" when I ran the command: php composer.phar install

so according to "www.softanalyst.com/zend-2-framework-installation-with-xampp/#comment-883" I need to run the following command:

php -r "readfile('https://getcomposer.org/installer');" | php

which I did and it all worked.

0
votes

open up your terminal and move To your project using the cd project directory

one type dir composer.phpr and try this one dir composer.json if both file listed than do the next step otherwise download the composer in current directory and run the following command as bellow.

php composer.phar install this comman will install all required dependency from the composer.json file. it will take time as depend on internet speed.

once it's complete than try this link for further steps.this link also having how To install composer And skeleton application.

Github Twitter