Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-16292

Database errors during conversion not propagated

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.3.0-RC1
    • 3.3.5-RC1
    • Installation system
    • None
    • CentOS 7.7.1908, PHP 7.3.13, Apache 2.4.41

    Description

      Instances where trigger_error() is called during installation/conversion, the error message is not propagated to the user. This is because the error message is not encoded as JSON and added to the response error array, it is just printed as text, which causes the JSON parsing to fail and the only error message presented to the user is "The installer detected a timeout". The error message can be found in the PHP error log as well as in the POST response to /install/app.php/update.

      Steps to reproduce:

      1. Upload fresh set of 3.3.0 files
      2. Update config.php with a valid config pointing to a database for conversion
      3. Change the table prefix to an incorrect one
      4. In the installer, click Update
      5. User will be presented with a timeout error message

      Expected response:

      Correct error message is displayed to the user.

       

      Error messages:

      PHP error log:

      PHP Fatal error:  Uncaught phpbb\\exception\\runtime_exception: 
      General Error:
      SQL ERROR [ mysqli ]
       
      Table 'phpbb30.TEForum_config' doesn't exist [1146]
       
      SQL
      SELECT config_name, config_value, is_dynamic
          FROM TEForum_config
       
      in file /var/www/html/phpbb/phpbb3.3.0/phpbb/db/driver/driver.php on line 1023
       
      BACKTRACE
      FILE: (not given by php)
      LINE: (not given by php)
      CALL: installer_msg_handler()
       
      FILE: [ROOT]/phpbb/db/driver/driver.php
      LINE: 1023
      CALL: trigger_error()
       
      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.php
      LINE: 71
      CALL: phpbb\\db\\driver\\factory->s in /var/www/html/phpbb/phpbb3.3.0/install/startup.php on line 96, 
      referer: http://localhost/phpbb/phpbb3.3.0/install/app.php/update
      

       

      POST response to /install/app.php/update:

      Fatal error: Uncaught phpbb\exception\runtime_exception: 
      General Error:
       
      SQL ERROR [ mysqli ]
      Table 'phpbb30.TEForum_config' doesn't exist [1146]
       
      SQL
      SELECT config_name, config_value, is_dynamic FROM TEForum_config
      in /var/www/html/phpbb/phpbb3.3.0/install/startup.php on line 96
       
       
       
       
      phpbb\exception\runtime_exception: 
      General Error:
      SQL ERROR [ mysqli ]
      Table 'phpbb30.TEForum_config' doesn't exist [1146]
       
      SQL
      SELECT config_name, config_value, is_dynamic FROM TEForum_config
      in file /var/www/html/phpbb/phpbb3.3.0/phpbb/db/driver/driver.php on line 1023
       
      BACKTRACE
      FILE: (not given by php)
      LINE: (not given by php)
      CALL: installer_msg_handler()
       
      FILE: [ROOT]/phpbb/db/driver/driver.php
      LINE: 1023
      CALL: trigger_error()
       
      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.php
      LINE: 71
      CALL: phpbb\db\driver\factory->sql_query()
       
      FILE: (not given by php)
      LINE: (not given by php)
      CALL: phpbb\config\db->__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]/includes/compatibility_globals.php
      LINE: 45
      CALL: Symfony\Component\DependencyInjection\ContainerBuilder->get()
       
      FILE: [ROOT]/phpbb/install/helper/container_factory.php
      LINE: 187
      CALL: register_compatibility_globals()
       
      FILE: [ROOT]/phpbb/install/helper/container_factory.php
      LINE: 91
      CALL: phpbb\install\helper\container_factory->build_container()
       
      FILE: [ROOT]/phpbb/install/installer.php
      LINE: 141
      CALL: phpbb\install\helper\container_factory->get()
       
      FILE: [ROOT]/phpbb/install/controller/update.php
      LINE: 133
      CALL: phpbb\install\installer->run()
       
      FILE: [ROOT]/vendor/symfony/http-foundation/StreamedResponse.php
      LINE: 114
      CALL: phpbb\install\controller\update->phpbb\install\controller\{closure:/var/www/html/phpbb/phpbb3.3.0/phpbb/install/controller/update.php:132-134}()
       
      FILE: [ROOT]/vendor/symfony/http-foundation/Response.php
      LINE: 374
      CALL: Symfony\Component\HttpFoundation\StreamedResponse->sendContent()
       
      FILE: [ROOT]/install/app.php
      LINE: 62
      CALL: Symfony\Component\HttpFoundation\Response->send()
      in /var/www/html/phpbb/phpbb3.3.0/install/startup.php on line 96
      

      Attachments

        Activity

          People

            Noxwizard Patrick Webster
            Noxwizard Patrick Webster
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: