2
只需從composer下載安裝程序即可。這就是我對我的composer.json:ZF2 - RuntimeException:模塊(ZfcUserDoctrineORM)無法初始化
"require": {
"php": ">=5.3.3",
"zf-commons/zfc-user": "dev-master",
"zendframework/zendframework": "2.3.*",
"zendframework/zend-developer-tools":"dev-master",
"doctrine/doctrine-orm-module":"dev-master",
"bjyoungblood/bjy-authorize": "1.4.*"
}
執行的命令PHP的composer.php自我更新和PHP安裝composer.phar,得到了成功。
在我application.config有以下幾個模塊:
'modules' => array(
'Base',
'DoctrineModule',
'DoctrineORMModule',
'ZendDeveloperTools',
'ZfcBase',
'ZfcUser',
'ZfcUserDoctrineORM',
'ZendDeveloperTools',
'BjyAuthorize',
'Users',
'Facebook'
),
,當我嘗試運行我的應用程序時出現的問題:總是返回與堆棧跟蹤狀態500:
Uncaught exception 'Zend\ModuleManager\Exception\RuntimeException' with message 'Module (ZfcUserDoctrineORM) could not be initialized.' in /home/triangulum/workspace-php/apegueme/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php:195
Stack trace:
#0 /home/triangulum/workspace-php/apegueme/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php(169): Zend\ModuleManager\ModuleManager->loadModuleByName(Object(Zend\ModuleManager\ModuleEvent))
#1 /home/triangulum/workspace-php/apegueme/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php(96): Zend\ModuleManager\ModuleManager->loadModule('ZfcUserDoctrine...')
#2 [internal function]: Zend\ModuleManager\ModuleManager->onLoadModules(Object(Zend\ModuleManager\ModuleEvent))
#3 /home/triangulum/workspace-php/apegueme/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\ModuleManager\ModuleEvent))
#4 /home/triangulum/workspace-ph in /home/triangulum/workspace-php/apegueme/vendor/zendframework/zendframework/library/Zend/ModuleManager/ModuleManager.php on line 195
已重新編寫這個過程幾次,總是得到相同的結果。
有人可以幫助我嗎?