-
Notifications
You must be signed in to change notification settings - Fork 122
Add mysqli connection flags to mysqli_real_connect #314
base: master
Are you sure you want to change the base?
Add mysqli connection flags to mysqli_real_connect #314
Conversation
Is anyone available to review this? @ezimuel @weierophinney ? |
@kris-sum We need test case for this change. |
@webimpress Any test case would require setting up SSL on the MySQL end - I can't see a way I can do that with the current integration test setup? |
@kris-sum mock |
@kris-sum can you provide the unit test as suggested by @webimpress ? Thanks. |
This repository has been moved to laminas/laminas-db. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:
|
This repository has been closed and moved to laminas/laminas-db; a new issue has been opened at laminas/laminas-db#53. |
The Mysqli driver doesn't allow setting of flags passed into mysqli_real_connect.
In some instances (like MySQL and PHP on Azure) MYSQLI_SSL_CLIENT needs to be set.
This calls
$this->resource->ssl_set($clientKey, $clientCert, $caCert, $caPath, $cipher);
to configure the SSL options, but no flag is set on mysqli_real_connect. Connection to Azure subsequently fails with 'SSL connection is required'Driver should allow connecting as illustrated in azure documentation at https://docs.microsoft.com/en-us/azure/mysql/howto-configure-ssl .
Added 'flags' config key to driver_options to support the setting of flags into mysqli_real_connect. This lets users supply MYSQLI_CLIENT_SSL and other connection flags as indicated on http://www.php.net/manual/en/mysqli.real-connect.php