PHP ZF2安装 - ZendSkeletonApplication正在抛出致命错误RuntimeException

I'm trying to execute ZendSkeletonApplication example for frist time. I've acted pursuant this articles from official Zend site: http://framework.zend.com/manual/2.0/en/user-guide/skeleton-application.html

BUT

Why should I download again all dependecies (entire ZF2) via composer if I already downloaded it (ZF2) from Git as zip archive?

Or Does part with php composer doing anything else than downloading entire ZF2? (I've very slow connection so it's problem)

I still get this error:

Fatal error: Uncaught exception 'RuntimeException' with message 'Unable to load ZF2. Run php composer.phar install or define a ZF2_PATH environment variable.'

My approach is following: (Using Win7, PHP 5.3.5)

  1. I downloaded entire ZF2 and ZendSkeletonApplication from Git as zip archives.

  2. I Unziped ZF2 to htdocs/ directory. (Now my path to the framework is: xampp/htdocs/ZendFramework-2.3.1/ )

  3. I Unziped ZendSkeletonApplication to htdocs/ (Path location: xampp/htdocs/zf2-tutorial/ )

  4. I checked presence of openssl extension. It's now enabled in php.ini

  5. I added the Zend Framework’s library path to the PHP include_path in php.ini

    ( include_path = ".;C:\xampp\php\PEAR; C:\xampp\htdocs\ZendFramework-2.3.1\library" )

  6. Now, If I type: localhost/zf2-tutorial/public/ , I get FatalError as I mentioned above..

Need I setup some other settings in ZendSkeletonApplication? Is it possible to install dependencies via php composer from downloaded zip archive of ZF2? (No internet connection) ... If so, How can I setup the composer?

EDIT:

After XAMPP update (php 5.5) I was capable to successfuly access ZFSkeletonAppllication's introductory site (localhost/) after I set ZF2_PATH environment variable.

Ok, but unfortunately same FatalError still occur right when I got to the next chapter of ZF2 SkeletonApplication:

http://framework.zend.com/manual/2.0/en/user-guide/unit-testing.html

There, PHPUnit framework has been involved to ZF2 application. When I want to run phpunit I get same error as above:

Fatal error: Uncaught exception 'RuntimeException' with message 'Unable to load ZF2. ....

I setuped ZF2_PATH environment variable in httpd.conf to:

SetEnv ZF2_PATH c:/xampp/htdocs/ZendFramework-2.3.1/library

I really don't know what I can do now...

Thanks for help.

Chances are include_path not working. You need to debug it why. Otherwise you can set ZF2_PATH environment variable as error itself demanded. It is easy way as you may setup framework at one folder while just need to setup ZF2_PATH variable. For debug, how ZF2 autoloading works, check /init_autloader.php .

No need to using composer every time for project setup. I also found it very annoying in composer way to install every time ZF2.