doumao6212 2017-07-13 08:47
浏览 900
已采纳

PHP启动:无法加载动态库PGSQL

I'am trying to run Symfony 3.x with :

  • Ubuntu 16.04
  • PHP 7.0
  • NGinx

I would like to interact with my PGSQL database that I created but I get this error :

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/php_pdo_pgsql.dll' - /usr/lib/php/20151012/php_pdo_pgsql.dll: cannot open shared object file: No such file or directory in Unknown on line 0

[Doctrine\DBAL\Exception\DriverException] An exception occured in driver: could not find driver
[Doctrine\DBAL\Driver\PDOException] could not find driver

[PDOException] could not find driver

So I looked at my phpinfo() and it seems that pgsql driver is enabled

phpinfo() result

Can anyone help me on this one ?

  • 写回答

3条回答 默认 最新

  • duanhuang2804 2017-07-13 08:53
    关注

    You must properly install the PostgreSQL module and enable it. http://php.net/manual/en/pgsql.installation.php

    P.S. do not use '.dll' files on the servers with UNIX based OS, because these extensions are compiled for the Windows operating system (for UNIX based OS you must use '.so' files).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 QQ邮箱过期怎么恢复?
  • ¥15 登录他人的vue项目显示服务器错误
  • ¥15 (标签-android|关键词-app)
  • ¥60 如何批量获取json的url
  • ¥15 comsol仿真压阻传感器
  • ¥15 Python线性规划函数optimize.linprog求解为整数
  • ¥15 llama3中文版微调
  • ¥15 pg数据库导入数据序列重复
  • ¥15 三分类机器学习模型可视化分析
  • ¥15 本地测试网站127.0.0.1 已拒绝连接,如何解决?(标签-ubuntu)