We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

webtools problem model view

https://web.vh/webtools.php?_url=/models

my setup (config.php) is ok

PDOException: SQLSTATE[3D000]: Invalid catalog name: 1046 No database selected
#0 [internal function]: PDO->query('SHOW TABLES')
#1 [internal function]: Phalcon\Db\Adapter\Pdo->query('SHOW TABLES', NULL, NULL)
#2 [internal function]: Phalcon\Db\Adapter->fetchAll('SHOW TABLES', 3)
#3 /home/intervlan/vhosts/phalcon-devtools/vendor/phalcon/devtools/scripts/Phalcon/Web/Tools/controllers/ControllerBase.php(54): Phalcon\Db\Adapter->listTables()
#4 /home/intervlan/vhosts/phalcon-devtools/vendor/phalcon/devtools/scripts/Phalcon/Web/Tools/controllers/ModelsController.php(30): ControllerBase->_listTables(true)
#5 [internal function]: ModelsController->indexAction()
#6 [internal function]: Phalcon\Dispatcher->dispatch()
#7 /home/intervlan/vhosts/phalcon-devtools/vendor/phalcon/devtools/scripts/Phalcon/Web/Tools.php(295): Phalcon\Mvc\Application->handle()
#8 /home/intervlan/vhosts/web/public/webtools.php(24): Phalcon\Web\Tools::main('/home/intervlan...')
#9 {main}

please, Help me!



5.0k
Accepted
answer

choose you databasename in app/config/config.php

    'database' => array(
        'adapter'     => 'Mysql',
        'host'        => 'localhost',
        'username'    => 'root',
        'password'    => '',
        'dbname'      => 'test',
    ),