Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-16417

SQL fatal error while updating database from older versions via CLI

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.3.1-RC1, 3.2.10
    • 3.2.9, 3.3.0
    • CLI
    • None

      If one tries to update the database from f.e. phpBB 3.0 to phpBB 3.3 via CLI using command like `php bin/phpbbcli.php --safe-mode db:migrate`, it immediately throws SQL error like:

      Fatal error: SQL ERROR [ mysqli ]<br /><br />Table '30.phpbb_config_text' doesn't exist [1146]<br /><br />An SQL error occurred while fetching this page. Please contact the <a href="mailto:contact@yourdomain.tld">Board Administrator</a> if this problem persists. in [ROOT]\phpbb\db\driver\driver.php on line 1023

      No migrations has applied.

       

      Further manual debugging gives the following.

      Actual SQL error:

      Fatal error: SQL ERROR [ mysqli ]
       
      Table '30.phpbb_config_text' doesn't exist [1146]
       
      SQL
       
      SELECT *
                              FROM phpbb_config_text
                              WHERE config_name = 'reparser_resume' in [ROOT]\phpbb\db\driver\driver.php on line 1023
      

      error backtrace:

      FILE: [ROOT]/phpbb/db/driver/mysqli.php
      LINE: 195
      CALL: phpbb\db\driver\driver->sql_error()
       
      FILE: [ROOT]/phpbb/db/driver/factory.php
      LINE: 345
      CALL: phpbb\db\driver\mysqli->sql_query()
       
      FILE: [ROOT]/phpbb/config/db_text.php
      LINE: 133
      CALL: phpbb\db\driver\factory->sql_query()
       
      FILE: [ROOT]/phpbb/config/db_text.php
      LINE: 68
      CALL: phpbb\config\db_text->get_array()
       
      FILE: [ROOT]/phpbb/textreparser/manager.php
      LINE: 63
      CALL: phpbb\config\db_text->get()
       
      FILE: [ROOT]/phpbb/cron/task/text_reparser/reparser.php
      LINE: 88
      CALL: phpbb\textreparser\manager->get_resume_data()
       
      FILE: [ROOT]/vendor/symfony/dependency-injection/ContainerBuilder.php
      LINE: 1646
      CALL: phpbb\cron\task\text_reparser\reparser->set_reparser()
       
      FILE: [ROOT]/vendor/symfony/dependency-injection/ContainerBuilder.php
      LINE: 1197
      CALL: Symfony\Component\DependencyInjection\ContainerBuilder->callMethod()
       
      FILE: [ROOT]/vendor/symfony/dependency-injection/ContainerBuilder.php
      LINE: 634
      CALL: Symfony\Component\DependencyInjection\ContainerBuilder->createService()
       
      FILE: [ROOT]/vendor/symfony/dependency-injection/ContainerBuilder.php
      LINE: 588
      CALL: Symfony\Component\DependencyInjection\ContainerBuilder->doGet()
       
      FILE: [ROOT]/phpbb/di/service_collection.php
      LINE: 57
      CALL: Symfony\Component\DependencyInjection\ContainerBuilder->get()
       
      FILE: [ROOT]/phpbb/di/service_collection_iterator.php
      LINE: 44
      CALL: phpbb\di\service_collection->offsetGet()
       
      FILE: [ROOT]/phpbb/cron/manager.php
      LINE: 76
      CALL: phpbb\di\service_collection_iterator->current()
       
      FILE: [ROOT]/phpbb/cron/manager.php
      LINE: 63
      CALL: phpbb\cron\manager->load_tasks()
       
      FILE: (not given by php)
      LINE: (not given by php)
      CALL: phpbb\cron\manager->__construct()
       
      FILE: [ROOT]/vendor/symfony/dependency-injection/ContainerBuilder.php
      LINE: 1176
      CALL: ReflectionClass->newInstanceArgs()
       
      FILE: [ROOT]/vendor/symfony/dependency-injection/ContainerBuilder.php
      LINE: 634
      CALL: Symfony\Component\DependencyInjection\ContainerBuilder->createService()
       
      FILE: [ROOT]/vendor/symfony/dependency-injection/ContainerBuilder.php
      LINE: 1281
      CALL: Symfony\Component\DependencyInjection\ContainerBuilder->doGet()
       
      FILE: [ROOT]/vendor/symfony/dependency-injection/ContainerBuilder.php
      LINE: 1238
      CALL: Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices()
       
      FILE: [ROOT]/vendor/symfony/dependency-injection/ContainerBuilder.php
      LINE: 1149
      CALL: Symfony\Component\DependencyInjection\ContainerBuilder->doResolveServices()
       
      FILE: [ROOT]/vendor/symfony/dependency-injection/ContainerBuilder.php
      LINE: 634
      CALL: Symfony\Component\DependencyInjection\ContainerBuilder->createService()
       
      FILE: [ROOT]/vendor/symfony/dependency-injection/ContainerBuilder.php
      LINE: 588
      CALL: Symfony\Component\DependencyInjection\ContainerBuilder->doGet()
       
      FILE: [ROOT]/phpbb/di/service_collection.php
      LINE: 57
      CALL: Symfony\Component\DependencyInjection\ContainerBuilder->get()
       
      FILE: [ROOT]/phpbb/di/service_collection_iterator.php
      LINE: 44
      CALL: phpbb\di\service_collection->offsetGet()
       
      FILE: [ROOT]/phpbb/console/application.php
      LINE: 100
      CALL: phpbb\di\service_collection_iterator->current()
       
      FILE: [ROOT]/bin/phpbbcli.php
      LINE: 89
      CALL: phpbb\console\application->register_container_commands()

       

            Marc Marc
            rxu rxu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: