Pages

Sunday, July 3, 2016

Zend Framework 3 developer mode "Undefined index: db"

Ones enabling the developer mode in Zend Framework 3 you may get the fallowing error.

Notice: Undefined index: db in /var/www/html/zf3/vendor/zendframework/zend-db/src/Adapter/AdapterServiceFactory.php on line 27

To get rid of this setup the db configuration in "config/autoload/global.php" as fallows

return [
    'db' => [
        'driver' => 'Pdo',
        'dsn'    => 'mysql:dbname=zf3;host=localhost',
    ],    // ...
];