Closed JLS-Envision closed 8 months ago
Curious.
Is there any chance we could get some SSH access to that box to do some investigating? If so, could you shoot that over to support@craftcms.com and reference this GH issue?
Instead of setting custom PDO attributes on the primary database connection by overriding config/app.php
, the place to do it should be config/db.php
.
e.g. this will work for both web and console requests that require an SSL connection to the database in config/db.php
<?php
return \craft\config\DbConfig::create()
->pdoAttributes([ PDO::MYSQL_ATTR_SSL_CA => '/app/mysql/DigiCertGlobalRootCA.crt.pem']);
I've just pushed an update to the docs to help clarify this scenario as well.
What happened?
Description
Craft is configured to use the Azure MySQL SSL certificate as follows:
This works fine for the website itself and it runs without issues. When I SSH in and try to run shell commands such as "craft up" I get errors such as the following:
I know there is nothing wrong with the path to the certificate because if I change it to an invalid path the "Caused by" becomes:
I have searched for for similar issues and this one sounds like it could be related, though kind of old: https://github.com/craftcms/cms/issues/11753
Here is the rest of the stack trace in case it helps somehow:
Craft CMS version
4.7.3
PHP version
8.1
Operating system and version
Linux Alpine or Ubuntu
Database type and version
MySQL 8
Image driver and version
No response
Installed plugins and versions
-