This topic is locked

Connecting via SSL to ClearDB

6/9/2015 1:42:49 AM
PHPRunner General questions
P
prab author

Hi,
We are using app with ClearDB Database and they have provided following string.
Where should i put following string to work ?
****

In order to connect via SSL using PHP, you'll need to use the "MySQLi" extension, like this:
$db = mysqli_init();

$db->ssl_set(PATH_TO_SSL_CLIENT_KEY_FILE, PATH_TO_SSL_CLIENT_CERT_FILE, PATH_TO_CA_CERT_FILE, null, null);

$db->real_connect(HOSTNAME, USERNAME, PASSWORD, DATABASE_NAME);

****
Thanks for help

Prab

Sergey Kornilov admin 6/9/2015

If your version of PHPRunner is 8.0 you can find all mysqli_ functions in source\connections\MySQLiConnction.php file and this is where you need to make your changes.

P
prab author 6/9/2015



If your version of PHPRunner is 8.0 you can find all mysqli_ functions in source\connections\MySQLiConnction.php file and this is where you need to make your changes.


Hi, I am using PHPRunner 8.0. I have opened the MySQLiConnection.php and there are lots of settings.

  1. Kindly be more specific what lines should be replaced for connection info and SSL info.
  2. How can i delete info from ConnectionManager.php or restore to default so it won't conflict.
    Thanks

Sergey Kornilov admin 6/9/2015

I do not have any specific advise here and I cannot even test this functionality. You need to experiment with those SSL settings. My guess is that you need to add your code somewhere before mysqli_connect function call.
Feel free to post an update here once you figured this out.