View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007240 | OXID eShop (all versions) | 7. --- Other tools -------------- | public | 2021-05-12 14:20 | 2024-03-06 15:05 |
Reporter | Alex | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | confirmed | Resolution | open | ||
Product Version | 6.3.0 | ||||
Summary | 0007240: Database options from config.inc.php are not used in migrations-db.php | ||||
Description | When connecting to a MySQL-Server with SSL enabled we need to specify the certificates within the dbDriverOptions (config.inc.php), for example like this: $this->dbDriverOptions[PDO::MYSQL_ATTR_INIT_COMMAND] = "SET NAMES utf8"; $this->dbDriverOptions[PDO::MYSQL_ATTR_SSL_CA] = "/app/certs/proxysql-ca.pem"; $this->dbDriverOptions[PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] = false; These parameters are not used within the migrations-db.php which leads to an error on connecting to the database: Fatal error: Uncaught PDOException: SQLSTATE[HY000] [1045] ProxySQL Error: Access denied for user 'erfalstaging' (using password: YES). SSL is required in /app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:38 Stack trace: #0 /app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(38): PDO->__construct('mysql:host=XXX...', 'XXXX', 'XXX...', Array) #1 /app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php(24): Doctrine\DBAL\Driver\PDOConnection->__construct('mysql:host=erfal...', 'XXX', 'XXX...', Array) #2 /app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(362): Doctrine\DBAL\Driver\PDOMySql\Driver->connect(Array, 'XXX', 'XXX...', Array) #3 /app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(427): Doctrine\DBAL\Connection->connect() #4 /app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(387): Doctrine\DBAL\Connection->getDatabasePlatformVersion() #5 /app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(330 in /app/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php on line 112 | ||||
Steps To Reproduce | - enforce SSL to DB-Server - specify SSL-Settings in config.inc.php - run vendor/bin/oe-eshop-db_migrate migrations:migrate | ||||
Additional Information | vendor/bin/oe-eshop-db_views_generate seems to work perfect - only the migration is not using the driverOptions from the config file. There might be other Scripts, that ignore the dirverOptions - I haven't checked everything. PHP-Version: 8.0.3 | ||||
Tags | No tags attached. | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | Other | ||||
Database Version | MySQL 5.7 | ||||