Hello dudes,
i have created a project with webtools by this command line : phalcon create-project teste --enable-webtools.
When i access https://localhost/teste/webtools.php it works like a charm , but when i try to click in MODELS menu i got an error. I am using a postgres config in config.php because my webtools don't have the CONFIGURATION menu : https://i.imgur.com/rQSUF4M.png
configuration on config.php :
<?php
return new \Phalcon\Config(array(
'database' => array(
'adapter' => 'PostgreSQL',
'host' => 'localhost:5432',
'username' => 'postgres',
'password' => '12345',
'dbname' => 'Teste',
),
'application' => array(
'controllersDir' => __DIR__ . '/../../app/controllers/',
'modelsDir' => __DIR__ . '/../../app/models/',
'viewsDir' => __DIR__ . '/../../app/views/',
'pluginsDir' => __DIR__ . '/../../app/plugins/',
'libraryDir' => __DIR__ . '/../../app/library/',
'cacheDir' => __DIR__ . '/../../app/cache/',
'baseUri' => '/teste/',
)
))
?>
Error
PDOException: could not find driver
0 [internal function]: PDO->__construct('pgsql:host=loca...', 'postgres', '12345', Array)
1 [internal function]: Phalcon\Db\Adapter\Pdo->connect(Array)
2 [internal function]: Phalcon\Db\Adapter\Pdo\Postgresql->connect(Array)
3 C:\xampp\htdocs\phalcon-tools\scripts\Phalcon\Web\Tools.php(313): Phalcon\Db\Adapter\Pdo->__construct(Array)
4 [internal function]: Phalcon\Web\Tools::Phalcon\Web\{closure}()
5 [internal function]: Phalcon\DI\Service->resolve(NULL, Object(Phalcon\DI\FactoryDefault))
6 C:\xampp\htdocs\phalcon-tools\scripts\Phalcon\Web\Tools.php(181): Phalcon\DI->getShared('db')
7 C:\xampp\htdocs\phalcon-tools\scripts\Phalcon\Web\Tools\controllers\ControllerBase.php(61): Phalcon\Web\Tools::getConnection()
8 C:\xampp\htdocs\phalcon-tools\scripts\Phalcon\Web\Tools\controllers\ModelsController.php(30): ControllerBase->listTables(true)
9 [internal function]: ModelsController->indexAction()
10 [internal function]: Phalcon\Dispatcher->dispatch()
11 C:\xampp\htdocs\phalcon-tools\scripts\Phalcon\Web\Tools.php(322): Phalcon\Mvc\Application->handle()
12 C:\xampp\htdocs\teste\public\webtools.php(26): Phalcon\Web\Tools::main('C:/xampp/htdocs...', '192.168.')
13 {main}
Sry about my bad english :(
Thanks for ur help.