Akshaya
Akshaya

Reputation: 115

Could not find a valid ServiceManager for RoutePluginManager

When I try to run zend program its shows error as follows

 PHP Fatal error:  Uncaught exception
 'Zend\ModuleManager\Listener\Exception\RuntimeException' with message
 'Could not find a valid ServiceManager for RoutePluginManager' in
 /Documents/zf2-example-login/vendor/zendframework/zend-modulemanager/src/Listener/ServiceListener.php:202
 Stack trace:
 #0 /Documents/zf2-example-login/vendor/zendframework/zend-eventmanager/src/EventManager.php(271):
 Zend\ModuleManager\Listener\ServiceListener-onLoadModulesPost(Object(Zend\ModuleManager\ModuleEvent))
 #1 /Documents/zf2-example-login/vendor/zendframework/zend-eventmanager/src/EventManager.php(143):
 Zend\EventManager\EventManager-triggerListeners(Object(Zend\ModuleManager\ModuleEvent))
 #2 /Documents/zf2-example-login/vendor/zendframework/zend-modulemanager/src/ModuleManager.php(129):
 Zend\EventManager\EventManager-triggerEvent(Object(Zend\ModuleManager\ModuleEvent))
 #3 /Documents/zf2-example-login/vendor/zendframework/zend-mvc/src/Application.php(264): Zend\ModuleManager\ModuleManager-> in
 /Documents/zf2-example-login/vendor/zendframework/zend-modulemanager/src/Listener/ServiceListener.php
 on line 202

I'm newbie to zend, I tried googling but unable to find the solution.Help me.

Upvotes: 2

Views: 901

Answers (1)

dougB
dougB

Reputation: 509

Found a clue here: https://github.com/zendframework/zend-modulemanager/issues/42

You first need to check to see if you have ZF3 installed. One quick way to check is to look under "vendor/zendframework" and see if you have a subdirectory "zend-router".

If so, add this to your application.config.php file under the "modules" key:

'Zend\Router'

Upvotes: 1

Related Questions