-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mysqli connection flags to mysqli_real_connect #53
Comments
Is anyone available to review this? @ezimuel @weierophinney ? Originally posted by @kris-sum at zendframework/zend-db#314 (comment) |
@kris-sum We need test case for this change. Originally posted by @michalbundyra at zendframework/zend-db#314 (comment) |
@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? Originally posted by @kris-sum at zendframework/zend-db#314 (comment) |
@kris-sum mock Originally posted by @michalbundyra at zendframework/zend-db#314 (comment) |
@kris-sum can you provide the unit test as suggested by @webimpress ? Thanks. Originally posted by @ezimuel at zendframework/zend-db#314 (comment) |
@webimpress, @michalbundyra, as @kris-sum pointed out above, PR #169 should resolve this issue. What needs to be done to get that PR merged? Happy to help in any way I can, as this fix would be very helpful to have! |
|
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
Originally posted by @kris-sum at zendframework/zend-db#314
The text was updated successfully, but these errors were encountered: