Details
-
Bug
-
Resolution: Fixed
-
High
-
2014.03, 5.3
Description
In a setup that relies completely on legacy configuration injection for the database settings and uses another DBMS but MySQL, database access fails:
Fatal error: Uncaught exception 'eZDBNoConnectionException' with message 'Unable to connect to the database server 'localhost' Error #1045: Access denied for user '*****'@'localhost' (using password: YES)' in [...]/ezpublish_legacy/lib/ezdb/classes/ezmysqlidb.php:135 Stack trace: #0 [...]/ezpublish_legacy/lib/ezdb/classes/ezmysqlidb.php(50): eZMySQLiDB->connect('localhost', '*****', '*****', '*****', false, 'utf-8', '') #1 [internal function]: eZMySQLiDB->eZMySQLiDB(Array) #2 [...]/ezpublish_legacy/lib/ezutils/classes/ezextension.php(551): ReflectionClass->newInstanceArgs(Array) #3 [...]/ezpublish_legacy/lib/ezdb/classes/ezdb.php(268): eZExtension::getHandlerClass(Object(ezpExtensionOptions)) #4 [...]/ezpublish_legacy/kernel/classes/ezpersistentobject.php(801): eZDB::instance() #5 [...]/ez in [...]/ezpublish_legacy/lib/ezdb/classes/ezmysqlidb.php on line 135
Obviously, the database driver setting is not injected into legacy kernel - though 'pdo_pgsql' is configured in doctrine.dbal.connections.mysiteacces.driver, legacy kernel loads the MySQL handler. Further observations show that
[DatabaseSettings]
DatabaseImplementation=ezmysqli
is default set in site.ini and not overriden by the Symfony Stack/Doctrine setting.
Adding
[DatabaseSettings]
DatabaseImplementation=ezpostgresql
to <legacy>/settings/override/site.ini.append.php serves as a workaround.
And confirmed: Afte