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

Phalcon DevTools (1.3.4) Error: could not find driver

HI everybody,

i have trying to find this error, without any result. if someone can help me i'll be grateful.

https://content.screencast.com/users/el_brother/folders/Jing/media/1278f468-1686-4349-9f7c-54b450ab6eab/00000008.png

my php extensions:

https://paste.ofcode.org/6zBFytNNQ5G38TWcr65mdE

Regards

What database do you use? Find out and then, install a PDO driver for it. For MySQL it should be pdo-mysql

Hello Everyone!

I have same problem when I can try create a model or all-models with DevTools in a project using PostgreSQL. Really I don't know if the problem is in the code or devtools. On the other hand, I post my files:

Config.php

return new \Phalcon\Config(array(
    'database' => array(
        'adapter'     => 'Postgresql',
        'host'        => 'localhost',
        'username'    => 'postgres',
        'password'    => 'xxxxx',
        'dbname'      => 'robots_1n',
        //'charset'     => 'utf8',
    ),
    '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'        => '/article2/',
    )
));

Services.php

$di->set('db', function() use ($config) {
    $dbclass = 'Phalcon\Db\Adapter\Pdo\\' . $config->database->adapter;
    return new $dbclass(array(
        "host"     => $config->database->host,
        "username" => $config->database->username,
        "password" => $config->database->password,
        "dbname"   => $config->database->name
    ));
});

PD: I'm using DevTools in SO Windows.

Thanks so much! If anybody can help me