Hello,
I am looking to disable SSL to connect to my hosting with Omeka-s 3.1.2 and I would like to know how I can integrate “MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT” in the code using Mysqli, the file is in “omeka-s\vendor\laminas-db\src\Adapter\Driver\Mysqli” to install the cms.
Php : 7.4.14
Mysql : 8.0.28
Omeka-s : 3.1.2
error: “An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user”.
Thanks for your help.
Linus_11
As the exception states, doesn’t seem like your problem is with certificates, but rather with credentials.
Hello,
Sorry for the confusion !
Thank you for your answer,
But why can I connect to the database (host, login, pass, user) and retrieve data from my table with a simple php script?
$conn = mysqli_init();
$conn->options(MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, false);
mysqli_ssl_set($conn, , , ,);
$conn->real_connect('$hostname', $username, password,$dbname,$port,'MYSQLI_CLIENT_SSL');
I know that with Omeka classic you can force SSL verification, on Omeka
with a code like this
// in "application/libraries/Zend/Db/Adapter/Mysqli.php" add MYSQLI_CLIENT_SSL.."
$_isConnected = @mysqli_real_connect(
$this->_connection,
$this->_config['host'],
$this->_config['username'],
$this->_config['password'],
$this->_config['dbname'],
$port,
$socket,
MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT
);
// option 'flags' to be replaced by "MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT"
I don’t know where to configure this parameter on Omeka-S
Maybe I should use PDO instead of Mysqli ? and configure it?
Linus.
I have no idea what this is about at this point, but please switch to English
I hope my comment is more readable / understandable above…