【发布时间】:2014-07-06 18:23:01
【问题描述】:
我无法从我的 本地 PHP 开发服务器连接到我在 Heroku 上的 PostgreSQL 数据库。这是因为 Heroku 要求我使用 SSL 进行连接。但是标准的 Windows PHP 5.5.12 PostgreSQL 客户端库似乎不支持 SSL。我收到以下错误:
pg_pconnect():无法连接到 PostgreSQL 服务器:sslmode 值 未编译 SSL 支持时“require”无效
我尝试从我的 Postgres 安装中复制 libpg.dll,但无济于事。
我运行了 phpinfo(),它在 pgsql 下显示:SSL disabled。
我安装了BitNami's WAPP Stack。 phpinfo() 在 pgsql 下列出:SSL enabled。但我仍然遇到同样的错误。
谁能告诉我如何在启用 SSL 的 Windows 上为 PHP 获取 PostgreSQL 客户端库?
没有满意答案的类似问题:
Heroku Postgres Connection from localhost PHP application
Unable to connect to PostgreSQL server
非常感谢任何帮助, 丹尼尔
【问题讨论】:
标签: php windows postgresql ssl heroku