You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We were trying to enable SSL for our MySQL connection by setting up PDO::MYSQL_ATTR_SSL_CA and other attributes, turns out there is no way to achieve it using databases.yml. While there seems to be attributes and an a vague "other" option being used in code, nothing gets passed to the actual connection.
lexpress/doctrine1/lib/Doctrine/Connection.php Line 215 in constructor:
First of all, if $adaptor["other"] is being checked, not sure why values in $adaptor["other"] are not being passed on to this->options. Secondly, why would $adaptor["other"] guarantee the presence of $adaptor["persistent"] is beyond me. Clearly seems to be an error.
There is also an issue with getOption method code (Line 262). If the option is not set, the code has no return value, making it a method that can be void and returning a value at the same time. Shouldn't it return null or false?
/**
* getOption
*
* Retrieves option
*
* @param string $option
* @return void
*/
public function getOption($option)
{
if (isset($this->options[$option])) {
return $this->options[$option];
}
}
We had to ultimately use the event doctrine.configure_connection in order to add PDO::MYSQL_ATTR_SSL_CA to the connection's other property in order to get the SSL connection. I think there has to be some way to pass additional options to the connection through databases.yml.
The text was updated successfully, but these errors were encountered:
Hi,
We were trying to enable SSL for our MySQL connection by setting up PDO::MYSQL_ATTR_SSL_CA and other attributes, turns out there is no way to achieve it using databases.yml. While there seems to be attributes and an a vague "other" option being used in code, nothing gets passed to the actual connection.
lexpress/doctrine1/lib/Doctrine/Connection.php Line 215 in constructor:
First of all, if $adaptor["other"] is being checked, not sure why values in $adaptor["other"] are not being passed on to this->options. Secondly, why would $adaptor["other"] guarantee the presence of $adaptor["persistent"] is beyond me. Clearly seems to be an error.
There is also an issue with getOption method code (Line 262). If the option is not set, the code has no return value, making it a method that can be void and returning a value at the same time. Shouldn't it return null or false?
We had to ultimately use the event doctrine.configure_connection in order to add PDO::MYSQL_ATTR_SSL_CA to the connection's other property in order to get the SSL connection. I think there has to be some way to pass additional options to the connection through databases.yml.
The text was updated successfully, but these errors were encountered: