Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-22925

Database setting injection is broken on upgrade

    XMLWordPrintable

Details

    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.

      Discussion: http://share.ez.no/forums/ez-publish-5-platform/unable-to-connect-to-the-database-server-after-upgrading-to-ez5.3-cp2014.03

      And confirmed: Afte

      Attachments

        Activity

          People

            Unassigned Unassigned
            mahner mahner
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 1 hour, 10 minutes
                1d 1h 10m