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

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 ?

图片转代码服务由CSDN问答提供 功能建议

我试图运行Symfony 3.x:

    \ n
  • Ubuntu 16.04
  • PHP 7.0
  • NGinx

    我想与之互动 我创建的PGSQL数据库,但是我收到了这个错误:

    PHP警告:PHP启动:无法加载动态库 '/ usr / lib / php / 20151012 /php_pdo_pgsql.dll' - /usr/lib/php/20151012/php_pdo_pgsql.dll:无法打开共享对象 文件:第0行的“未知”中没有此类文件或目录

    [Doctrine \ DBAL \ Exception \ DriverException]驱动程序中出现 异常:找不到驱动程序
    [Doctrine \ DBAL \ Driver \ PDOException]无法找到驱动程序

    [PDOException]找不到驱动程序

    所以我查看了我的 phpinfo(),似乎启用了pgsql驱动程序

    任何人都可以帮我这个吗?

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

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条)

相关推荐 更多相似问题