【发布时间】:2016-06-07 14:00:58
【问题描述】:
我正在尝试从 EB 连接到 RDS 实例。但是我收到了这个讨厌的错误
Fatal error: Call to undefined function pg_connect()
我尝试通过在 .ebextensions 文件夹中创建包含以下内容的 packages.config 文件来安装 php_pgsql。
packages:
yum:
php56-pgsql: []
commands:
01-install-pglib:
command: "yum install -y postgresql94-libs"
02-install-pg:
command: "yum install -y php56-pgsql"
03-install-pg:
command: "service httpd restart"
但它不起作用。有什么方法可以在 ElasticBeanstalk 中为 PHP 安装 pg 客户端。
【问题讨论】:
-
我觉得你需要使用PDO来连接RDS PostgreSQL
标签: php postgresql amazon-web-services amazon-elastic-beanstalk