Zend\ServiceManager\ServiceManager::get was unable to fetch

For programming and general questions on Zend Framework

Zend\ServiceManager\ServiceManager::get was unable to fetch

Postby shoa8601 on Tue Mar 07, 2017 1:33 pm

I am trying to modify and copy a custom module i have setup everything DB connection is but getting the error while going to view my module as follows:
Here is the my module.config file:
Code: Select all
return array(
'controllers' => array(
     'invokables' => array(
         'Album\Controller\Album' => 'Album\Controller\AlbumController',
     ),
),


// The following section is new and should be added to your file
'router' => array(
     'routes' => array(
         'album' => array(
             'type'    => 'segment',
             'options' => array(
                 'route'    => '/album[/:action][/:id]',
                 'constraints' => array(
                     'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
                     'id'     => '[0-9]+',
                 ),
                 'defaults' => array(
                     'controller' => 'Album\Controller\Album',
                     'action'     => 'index',
                 ),
             ),
         ),
     ),
),

'view_manager' => array(
     'template_path_stack' => array(
         'album' => __DIR__ . '/../view',
     ),
),
);


And here is the database connection in global.php
Code: Select all
return array(
'db' => array(
    'driver'         => 'Pdo',
    'dsn'            => 'mysql:dbname=stickynotes;host=localhost',
    'driver_options' => array(
        PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''
    ),
),
'service_manager' => array(
    'factories' => array(
        'Zend\Db\Adapter\Adapter'
                => 'Zend\Db\Adapter\AdapterServiceFactory',
    ),
),
);
shoa8601
 
Posts: 1
Joined: Tue Mar 07, 2017 1:31 pm

Return to Zend Framework

Who is online

Users browsing this forum: No registered users and 2 guests