ZF2上的ZfcBase模块尚未启动

时间:2013-06-04 08:19:59

标签: apache zend-framework2 zfcuser

我按照ZfcUser的安装说明进行操作。

composer.json看起来像这样:

{
    "name": "zendframework/skeleton-application",
    "description": "Skeleton Application for ZF2",
    "license": "BSD-3-Clause",
    "keywords": [
        "framework",
        "zf2"
    ],
    "homepage": "http://framework.zend.com/",
    "require": {
        "php": ">=5.3.3",
        "zendframework/zendframework": ">2.2.0rc1",
        "zendframework/zend-developer-tools": "dev-master",
        "zendframework/zftool": "dev-master",
    "zf-commons/zfc-user": "dev-master"
    }
}

然后我运行了以下命令:

> php composer.phar self-update
> php compsoer.phar update

它将./zfc-base和./zfc-user安装到带路径的./vendor/zf-commons文件夹中。 在config / application.config.php中,我将'ZfcBase'和'ZfcUser'模块添加到'modules'数组中。

在所有这些之后我发现错误500.Apache错误日志保持以下状态:

[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP Warning:  include(/var/www/html/zf2-test/vendor/zf-commons/zfc-base/Module.php): failed to open stream: Permission denied in /var/www/html/zf2-test/vendor/composer/ClassLoader.php on line 185
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP Stack trace:
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP   1. {main}() /var/www/html/zf2-test/public/index.php:0
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP   2. Zend\\Mvc\\Application::init() /var/www/html/zf2-test/public/index.php:13
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP   3. Zend\\ModuleManager\\ModuleManager->loadModules() /var/www/html/zf2-test/vendor/ZF2/library/Zend/Mvc/Application.php:253
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP   4. Zend\\EventManager\\EventManager->trigger() /var/www/html/zf2-test/vendor/ZF2/library/Zend/ModuleManager/ModuleManager.php:109
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP   5. Zend\\EventManager\\EventManager->triggerListeners() /var/www/html/zf2-test/vendor/ZF2/library/Zend/EventManager/EventManager.php:207
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP   6. call_user_func() /var/www/html/zf2-test/vendor/ZF2/library/Zend/EventManager/EventManager.php:468
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP   7. Zend\\ModuleManager\\ModuleManager->onLoadModules() /var/www/html/zf2-test/vendor/ZF2/library/Zend/EventManager/EventManager.php:468
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP   8. Zend\\ModuleManager\\ModuleManager->loadModule() /var/www/html/zf2-test/vendor/ZF2/library/Zend/ModuleManager/ModuleManager.php:90
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP   9. Zend\\ModuleManager\\ModuleManager->loadModuleByName() /var/www/html/zf2-test/vendor/ZF2/library/Zend/ModuleManager/ModuleManager.php:149
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP  10. Zend\\EventManager\\EventManager->trigger() /var/www/html/zf2-test/vendor/ZF2/library/Zend/ModuleManager/ModuleManager.php:171
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP  11. Zend\\EventManager\\EventManager->triggerListeners() /var/www/html/zf2-test/vendor/ZF2/library/Zend/EventManager/EventManager.php:207
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP  12. call_user_func() /var/www/html/zf2-test/vendor/ZF2/library/Zend/EventManager/EventManager.php:468
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP  13. Zend\\ModuleManager\\Listener\\ModuleResolverListener->__invoke() /var/www/html/zf2-test/vendor/ZF2/library/Zend/EventManager/EventManager.php:468
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP  14. class_exists() /var/www/html/zf2-test/vendor/ZF2/library/Zend/ModuleManager/Listener/ModuleResolverListener.php:28
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP  15. spl_autoload_call() /var/www/html/zf2-test/vendor/ZF2/library/Zend/ModuleManager/Listener/ModuleResolverListener.php:28
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP  16. Composer\\Autoload\\ClassLoader->loadClass() /var/www/html/zf2-test/vendor/ZF2/library/Zend/ModuleManager/Listener/ModuleResolverListener.php:0
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP Warning:  include(): Failed opening '/var/www/html/zf2-test/vendor/zf-commons/zfc-base/Module.php' for inclusion (include_path='.:/usr/bin/pear:/usr/bin/php') in /var/www/html/zf2-test/vendor/composer/ClassLoader.php on line 185
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP Stack trace:
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP   1. {main}() /var/www/html/zf2-test/public/index.php:0
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP   2. Zend\\Mvc\\Application::init() /var/www/html/zf2-test/public/index.php:13
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP   3. Zend\\ModuleManager\\ModuleManager->loadModules() /var/www/html/zf2-test/vendor/ZF2/library/Zend/Mvc/Application.php:253
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP   4. Zend\\EventManager\\EventManager->trigger() /var/www/html/zf2-test/vendor/ZF2/library/Zend/ModuleManager/ModuleManager.php:109
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP   5. Zend\\EventManager\\EventManager->triggerListeners() /var/www/html/zf2-test/vendor/ZF2/library/Zend/EventManager/EventManager.php:207
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP   6. call_user_func() /var/www/html/zf2-test/vendor/ZF2/library/Zend/EventManager/EventManager.php:468
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP   7. Zend\\ModuleManager\\ModuleManager->onLoadModules() /var/www/html/zf2-test/vendor/ZF2/library/Zend/EventManager/EventManager.php:468
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP   8. Zend\\ModuleManager\\ModuleManager->loadModule() /var/www/html/zf2-test/vendor/ZF2/library/Zend/ModuleManager/ModuleManager.php:90
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP   9. Zend\\ModuleManager\\ModuleManager->loadModuleByName() /var/www/html/zf2-test/vendor/ZF2/library/Zend/ModuleManager/ModuleManager.php:149
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP  10. Zend\\EventManager\\EventManager->trigger() /var/www/html/zf2-test/vendor/ZF2/library/Zend/ModuleManager/ModuleManager.php:171
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP  11. Zend\\EventManager\\EventManager->triggerListeners() /var/www/html/zf2-test/vendor/ZF2/library/Zend/EventManager/EventManager.php:207
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP  12. call_user_func() /var/www/html/zf2-test/vendor/ZF2/library/Zend/EventManager/EventManager.php:468
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP  13. Zend\\ModuleManager\\Listener\\ModuleResolverListener->__invoke() /var/www/html/zf2-test/vendor/ZF2/library/Zend/EventManager/EventManager.php:468
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP  14. class_exists() /var/www/html/zf2-test/vendor/ZF2/library/Zend/ModuleManager/Listener/ModuleResolverListener.php:28
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP  15. spl_autoload_call() /var/www/html/zf2-test/vendor/ZF2/library/Zend/ModuleManager/Listener/ModuleResolverListener.php:28
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP  16. Composer\\Autoload\\ClassLoader->loadClass() /var/www/html/zf2-test/vendor/ZF2/library/Zend/ModuleManager/Listener/ModuleResolverListener.php:0
[Mon Jun 03 23:52:40 2013] [error] [client ::1] PHP Fatal error:  Uncaught exception 'Zend\\ModuleManager\\Exception\\RuntimeException' with message 'Module (ZfcBase) could not be initialized.' in /var/www/html/zf2-test/vendor/ZF2/library/Zend/ModuleManager/ModuleManager.php:175
Stack trace:
#0 /var/www/html/zf2-test/vendor/ZF2/library/Zend/ModuleManager/ModuleManager.php(149): Zend\\ModuleManager\\ModuleManager->loadModuleByName(Object(Zend\\ModuleManager\\ModuleEvent))
#1 /var/www/html/zf2-test/vendor/ZF2/library/Zend/ModuleManager/ModuleManager.php(90): Zend\\ModuleManager\\ModuleManager->loadModule('ZfcBase')
#2 [internal function]: Zend\\ModuleManager\\ModuleManager->onLoadModules(Object(Zend\\ModuleManager\\ModuleEvent))
#3 /var/www/html/zf2-test/vendor/ZF2/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\\ModuleManager\\ModuleEvent))
#4 /var/www/html/zf2-test/vendor/ZF2/library/Zend/EventManager/EventManager.php(207): Zend\\EventManager\\EventManager->triggerListeners('loadModules', Object(Zend\\ModuleManager\\ModuleEvent), NULL)
#5 /var/www/ in /var/www/html/zf2-test/vendor/ZF2/library/Zend/ModuleManager/ModuleManager.php on line 175

我已将./vendor文件夹的权限设置为0755 -R,但是,事情仍然无法正常工作...我一直得到相同的错误...没有ZfcUser和ZfcBase应用程序正常工作。 ..

1 个答案:

答案 0 :(得分:0)

您是否添加了application.config.php

        'module_paths' => array(
        './module',
        './vendor',
        './vendor/zf-commons',
    )