我正在将Symfony 4.4与PHP 7.2和postgres 11一起使用
我已在文件php.ini(/etc/php/7.2/fpm/php.ini
中启用了extension = pdo_pgsql和extension = pgsql然后,我重新启动了PHP和Nginx服务器。
我已在Symfony应用程序目录的.env文件中添加了这一行
DATABASE_URL=pgsql://postgres:postgres@127.0.0.1:5432/db_name?serverVersion=5.7
当我尝试通过运行此命令来创建数据库时
php bin/console doctrine:database:create
我遇到了以下错误
In AbstractPostgreSQLDriver.php line 79:
An exception occurred in driver: could not find driver
In PDOConnection.php line 31:
could not find driver
In PDOConnection.php line 27:
could not find driver