音乐商店部署在zend框架上,从git存储库部署后,我得到了这些错误
这些错误太多了,我对框架一无所知。请帮帮我!!!
(!)致命错误:未捕获异常"Zend\ModuleManager\Exception\RuntimeException",消息为"Module"(应用程序)无法初始化。'在里面C: \examplep\htdocs\albumzend\vendor\zendframework\zendfframework\library\Zend\ModuleManager\ModuleManager.php在第189行(!)Zend\ModuleManager\Exception\RuntimeException:无法初始化模块(应用程序)。在里面C: \examplep\htdocs\albumzend\vendor\zendframework\zendfframework\library\Zend\ModuleManager\ModuleManager.php在线189调用堆栈#时间记忆功能位置1 0.0010 135312{main}()。。\index.php:0 2 0.0270 266752 Zend\Mvc\Application::init()。。\index.php:173 0.1630 1117408 Zend\ModuleManager\ModuleManager->loadModules()。。\Application.php:2524 0.1630 1117592 Zend\EventManager\EventManager->触发器()。。\ModuleManager.php:1095 0.1630 1117776 Zend\EventManager\EventManager->triggerListeners()。。\EventManager.php:207 6 0.1670 1131560 call_user_func()。。\EventManager.php:4687 0.1670 1131576 Zend\ModuleManager\ModuleManager->onLoadModules()。。\EventManager.php:4688 0.1670 1131912 Zend\ModuleManager\ModuleManager->loadModule()。。\ModuleManager.php:909 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 ZendServiceManagerConfig.
// '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"
文件结构:
http://i58.tinypic.com/2uqcbpv.png
Git存储库:https://github.com/srish/Music-Store.git
在您的git中,我没有看到启动zend框架应用程序的带有index.php文件的公共目录,我看到您将其移动到相册/index.php,但它再次不是zend框架1.12 的自动项目生成器提供的文件
我有一个主意给你。下载最新的ZF 1(现在是1.12,而不是2008年的1.8),然后再次尝试重新创建您的项目。它会更好地发挥作用,因为性能甚至框架都发生了几次巨大的变化,产生了巨大的积极影响。
PS:在启动ZF的index.php文件中,您不应该进行任何更改。试着在应用程序目录的Bootstrap.php中制作它们。