-
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
I tried connecting my local codebase with the remote database through PDO but its not working, after that I made some changes in core.php and created a function using mysqli, and now the connection is working.
I used the same connection variables and pem files for verification
inside connect function in core.php
I also tried directly writing the PDO code as follows:
$clientCertPath = $_SERVER['DOCUMENT_ROOT'] . "/client-cert.pem";
$clientKeyPath = $_SERVER['DOCUMENT_ROOT'] . "/client-key.pem";
$caCertPath = $_SERVER['DOCUMENT_ROOT'] . "/server-ca.pem";
// PDO Connection options for SSL
$pdoOptions = array(
\PDO::MYSQL_ATTR_SSL_CA => $caCertPath,
\PDO::MYSQL_ATTR_SSL_KEY => $clientKeyPath,
\PDO::MYSQL_ATTR_SSL_CERT => $clientCertPath,
\PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => false,
);
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
To do