【发布时间】:2015-11-20 21:27:17
【问题描述】:
我正在尝试使用 Propel reverse 命令对数据库进行逆向工程。我尝试连接的数据库需要 SSL 证书,这就是我在应用程序中连接它的方式:
new PDO(
'mysql:host=localhost;dbname=blog',
'root', '', array(PDO::MYSQL_ATTR_SSL_CA => '/path/ssl-cert.crt'
);
我的 Propel 配置文件:
propel:
database:
connections:
blog:
adapter: mysql
classname: Propel\Runtime\Connection\ConnectionWrapper
dsn: "mysql:host=localhost;dbname=blog"
user: root
password:
options:
PDO::MYSQL_ATTR_SSL_CA: /path/ssl-cert.crt
我收到以下错误:
[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
Unrecognized option "PDO::MYSQL_ATTR_SSL_CA" under "propel.database.connections.gateway.options"
我阅读了这篇文章:Secure Propel connection, remote MySQL,这是旧版本 Propel 的第一个答案链接,我还尝试了替代答案,将 PDO::MYSQL_ATTR_SSL_CA 替换为其整数值。没有任何效果,以前有人遇到过这个问题吗?我错过了什么?
【问题讨论】:
标签: php ssl-certificate propel2