Reputation: 3
I tried to follow the tutorial of Zend Fremework 3, step by step, but I get the following error:
Fatal error: Uncaught exception 'Zend\ModuleManager\Exception\RuntimeException' with message 'Module (Album) could not be initialized.' in /var/www/html/skeleton-application/vendor/zendframework/zend-modulemanager/src/ModuleManager.php:203 Stack trace: #0 /var/www/html/skeleton-application/vendor/zendframework/zend-modulemanager/src/ModuleManager.php(175): Zend\ModuleManager\ModuleManager->loadModuleByName(Object(Zend\ModuleManager\ModuleEvent)) #1 /var/www/html/skeleton-application/vendor/zendframework/zend-modulemanager/src/ModuleManager.php(97): Zend\ModuleManager\ModuleManager->loadModule('Album') #2 /var/www/html/skeleton-application/vendor/zendframework/zend-eventmanager/src/EventManager.php(271): Zend\ModuleManager\ModuleManager->onLoadModules(Object(Zend\ModuleManager\ModuleEvent)) #3 /var/www/html/skeleton-application/vendor/zendframework/zend-eventmanager/src/EventManager.php(143): Zend\EventManager\EventManager->triggerListeners(Object(Zend\ModuleManager\ModuleEvent)) #4 /var/www/html/skeleton-application/vendo in /var/www/html/skeleton-application/vendor/zendframework/zend-modulemanager/src/ModuleManager.php on line 203
This is my config/modules.config.php file:
return [
'Zend\Form',
'Zend\Db',
'Zend\Cache',
'ZendDeveloperTools',
'Zend\Router',
'Zend\Validator',
'Application',
'Album', ];
If I comment the 'Album' entry, the homepage is displayed properly.
Can someone give me some suggestions?
Thanks
Upvotes: 0
Views: 2949
Reputation:
Looking at the error message I'm guessing you are at setting up the Album module.
You need to check composer.json if the following is included:
"autoload": {
"psr-4": {
"Application\\": "module/Application/src/",
"Album\\": "module/Album/src/"
}
},
After that you need to run composer dump-autoload
to update the autoloading rules.
If this doesn't help, please tell at what stage you are.
Upvotes: 2