【发布时间】:2014-06-12 02:58:04
【问题描述】:
音乐商店部署在 zend 框架上,从 git 存储库部署后出现这些错误
这些错误太多了,我是框架的菜鸟。请帮我 !!!
( ! ) 致命错误:未捕获的异常 带有消息“模块”的“Zend\ModuleManager\Exception\RuntimeException” (应用程序)无法初始化。在 C:\xampp\htdocs\albumzend\vendor\zendframework\zendframework\library\Zend\ModuleManager\ModuleManager.php 在第 189 行 (!) Zend\ModuleManager\Exception\RuntimeException: 无法初始化模块(应用程序)。在 C:\xampp\htdocs\albumzend\vendor\zendframework\zendframework\library\Zend\ModuleManager\ModuleManager.php 在第 189 行调用堆栈 # 时间记忆函数位置 1 0.0010 135312 {main}( ) ..\index.php:0 2 0.0270 266752 Zend\Mvc\Application::init( ) ..\index.php:17 3 0.1630 1117408 Zend\ModuleManager\ModuleManager->loadModules( ) ..\Application.php:252 4 0.1630 1117592 Zend\EventManager\EventManager->触发器( ) ..\ModuleManager.php:109 5 0.1630 1117776 Zend\EventManager\EventManager->triggerListeners( ) ..\EventManager.php:207 6 0.1670 1131560 call_user_func ( ) ..\EventManager.php:468 7 0.1670 1131576 Zend\ModuleManager\ModuleManager->onLoadModules( ) ..\EventManager.php:468 8 0.1670 1131912 Zend\ModuleManager\ModuleManager->loadModule( ) ..\ModuleManager.php:90 9 0.1670 1132064 Zend\ModuleManager\ModuleManager->loadModuleByName( ) ..\ModuleManager.php:163
我的应用程序.PHP
<?php
return array(
// This should be an array of module namespaces used in the application.
'modules' => array(
'Application',
'Musicstore',
),
// These are various options for the listeners attached to the ModuleManager
'module_listener_options' => array(
// This should be an array of paths in which modules reside.
// If a string key is provided, the listener will consider that a module
// namespace, the value of that key the specific path to that module's
// Module class.
'module_paths' => array(
'./module',
'./vendor',
),
// An array of paths from which to glob configuration files after
// modules are loaded. These effectively override configuration
// provided by modules themselves. Paths may use GLOB_BRACE notation.
'config_glob_paths' => array(
'config/autoload/{,*.}{global,local}.php',
),
// Whether or not to enable a configuration cache.
// If enabled, the merged configuration will be cached and used in
// subsequent requests.
//'config_cache_enabled' => $booleanValue,
// The key used to create the configuration cache file name.
//'config_cache_key' => $stringKey,
// Whether or not to enable a module class map cache.
// If enabled, creates a module class map cache which will be used
// by in future requests, to reduce the autoloading process.
//'module_map_cache_enabled' => $booleanValue,
// The key used to create the class map cache file name.
//'module_map_cache_key' => $stringKey,
// The path in which to cache merged configuration.
//'cache_dir' => $stringPath,
// Whether or not to enable modules dependency checking.
// Enabled by default, prevents usage of modules that depend on other modules
// that weren't loaded.
// 'check_dependencies' => true,
),
// Used to create an own service manager. May contain one or more child arrays.
//'service_listener_options' => array(
// array(
// 'service_manager' => $stringServiceManagerName,
// 'config_key' => $stringConfigKey,
// 'interface' => $stringOptionalInterface,
// 'method' => $stringRequiredMethodName,
// ),
// )
// Initial configuration with which to seed the ServiceManager.
// Should be compatible with Zend\ServiceManager\Config.
// 'service_manager' => array(),
);
INDEX.PHP 模块>musicstore>ablums>index.php
<?php
error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', 1);
date_default_timezone_set('Asia/Kolkata');
// directory setup and class loading
set_include_path('.' . PATH_SEPARATOR . '/xampp/htdocs/albumzend/library/'
. PATH_SEPARATOR . '/xampp/htdocs/albumzend/application/models/albums'
. PATH_SEPARATOR . '/xampp/htdocs/albumzend/application/forms/albums'
. PATH_SEPARATOR . get_include_path());
include "Zend/Loader/Autoloader.php";
$loader = Zend_Loader_Autoloader::getInstance();
$loader->registerNamespace('Models');
$loader->setFallbackAutoloader(true);
$loader->suppressNotFoundWarnings(false);
$view = new Zend_View();
$view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
$viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
$viewRenderer->setView($view);
Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
// load configuration
$config = new Zend_Config_Ini('/xampp/htdocs/albumzend/application/config.ini', 'general');
$registry = Zend_Registry::getInstance();
$registry->set('config', $config);
// setup database
$db = Zend_Db::factory($config->db);
Zend_Db_Table::setDefaultAdapter($db);
$registry->set('db', $db);
// setup controller
$frontController = Zend_Controller_Front::getInstance();
$frontController->throwExceptions(true);
$frontController->setControllerDirectory('/xampp/htdocs/albumzend/application/controllers');
Zend_Layout::startMvc(array('layoutPath'=>'/xampp/htdocs/albumzend/application/layouts'));
// run!
$frontController->dispatch();
?>
我的申请
module>musicstore>application>configs>Application.ini
[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "xampp/htdocs/albumzend/library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
文件结构:
【问题讨论】:
-
不要质疑评论。质疑该评论
-
问题标题过长
-
编辑了描述。抱歉,我是新手。
标签: php git zend-framework netbeans xampp