Fatal error: Uncaught exception in Zend ServiceManager

1.2k views Asked by At

I'm having this error:

( ! ) Fatal error: Uncaught exception 'Zend\ServiceManager\Exception\ServiceNotFoundException' with message 'Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for Professor/Controller/WebinarController' in /uov-videos/www/david/plataovirtual/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php on line 526

This happens when I'm trying to use:

   $app = Zend\Mvc\Application::init(require 'config/application.config.php');
    $application = $app->getMvcEvent()->getApplication();
    $sm = $application->getServiceManager();
    $webinar_controller = $sm->get('Professor/Controller/WebinarController');

In a routine outside the original project.

Any suggestions?

2

There are 2 answers

1
Isaque Palmieri On

I had the same problem, configure your PHP version is compatible

1
Jean Henrique On

Try to run a composer update and/or composer install ;)