Hey people!
I'm trying to set up a project in a Yosemite Mac environment. The project I plan to run works normally on an Ubuntu. I installed the PDO drive. In phpinfo it looks like this:
PDO
PDO support => enabled
PDO drivers => mysql, odbc, sqlite, pgsql
pdo_mysql
PDO Driver for MySQL => enabled
Client API version => mysqlnd 5.0.11-dev - 20120503 - $Id: 15d5c781cfcad91193dceae1d2cdd127674ddb3e $
Directive => Local Value => Master Value
pdo_mysql.default_socket => /tmp/mysql.sock => /tmp/mysql.sock
PDO_ODBC
PDO Driver for ODBC (unixODBC) => enabled
ODBC Connection Pooling => Enabled, strict matching
pdo_pgsql
PDO Driver for PostgreSQL => enabled
PostgreSQL(libpq) Version => 9.4.4
Module version => 1.0.2
Revision => $Id: af568c8ae63693bc2b766337bd4731078e62f9b4 $
pdo_sqlite
PDO Driver for SQLite 3.x => enabled
SQLite Library => 3.8.10.2
My doctrine.global.php looks like this:
return array(
'doctrine' => array(
'connection' => array(
'orm_default' => array(
'driverClass' => 'Doctrine\DBAL\Driver\PDOPgSql\Driver',
'params' => array(
'host' => 'localhost',
'port' => '5432',
'user' => 'USER_POSTGRES',
'password' => 'USER_PASSWORD',
'dbname' => 'my_database',
)
)
)
),
);
But every time I run the project I get the error:
PHP Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in PASTA_DO_MEU_PROJETO/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43
Stack trace:
#0 PASTA_DO_MEU_PROJETO/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(43): PDO->__construct('pgsql:host=loca...', 'postgres', 'postgres', Array)
#1 PASTA_DO_MEU_PROJETO/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php(46): Doctrine\DBAL\Driver\PDOConnection->__construct('pgsql:host=loca...', 'postgres', 'postgres', Array)
#2 PASTA_DO_MEU_PROJETO/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(360): Doctrine\DBAL\Driver\PDOPgSql\Driver->connect(Array, 'postgres', 'postgres', Array)
#3 PASTA_DO_MEU_PROJETO/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): Doctrine\DBAL\Connection->connect()
#4 PASTA_DO_MEU_PROJETO/vendor/doctrine/ in PASTA_DO_MEU_PROJETO/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php on line 912
Could anyone help me?