Migrate from 7.14.6 to 8.8.0 failed with error PHP Fatal error: Uncaught Exception: Database failure

Hi,

Env:

  • Ubuntu 24.04.2
  • Apache 2.4.58
  • PHP 8.3.6
  • MariaDB 10.11.8
  • From SuiteCRM: 7.14.6
  • New SuiteCRM: 8.8.0

I tried to migrate from 7.14.6 to 8.8.0 using the migration guide in Migration - 7.14.x to 8.7.0+ :: SuiteCRM Documentation. But when I run the ./bin/console suitecrm:app:setup-legacy-migration, I have the following error:

PHP Fatal error: Uncaught Exception: Database failure. Please refer to suitecrm.log for details. in /var/www/html/SuiteCRM/public/legacy/include/utils.php:2131
Stack trace:
#0 /var/www/html/SuiteCRM/public/legacy/include/database/DBManager.php(354): sugar_die()
#1 /var/www/html/SuiteCRM/public/legacy/include/database/DBManager.php(329): DBManager->registerError()
#2 /var/www/html/SuiteCRM/public/legacy/include/database/MysqliManager.php(184): DBManager->checkError()
#3 /var/www/html/SuiteCRM/public/legacy/modules/Administration/Administration.php(136): MysqliManager->query()
#4 /var/www/html/SuiteCRM/public/legacy/include/entryPoint.php(226): Administration->retrieveSettings()
#5 /var/www/html/SuiteCRM/config/bootstrap.php(71): require_once(‘…’)
#6 /var/www/html/SuiteCRM/bin/console(30): require(‘…’)
#7 {main}
thrown in /var/www/html/SuiteCRM/public/legacy/include/utils.php on line 2131

Check the suitecrm.log:
Sat Mar 8 2025 at 11:04:19 [186340][-none-][DEBUG] current_language is: en_us
Sat Mar 8 2025 at 11:04:19 [186340][-none-][DEBUG] Found cache backend SugarCachesMash
Sat Mar 8 2025 at 11:04:19 [186340][-none-][DEBUG] Found cache backend SugarCacheWincache
Sat Mar 8 2025 at 11:04:19 [186340][-none-][DEBUG] Found cache backend SugarCacheMemory
Sat Mar 8 2025 at 11:04:19 [186340][-none-][DEBUG] Using cache backend SugarCacheMemory, since 999 is less than 1000
Sat Mar 8 2025 at 11:04:19 [186340][-none-][DEBUG] Found cache backend SugarCacheRedis
Sat Mar 8 2025 at 11:04:19 [186340][-none-][DEBUG] Found cache backend SugarCacheFile
Sat Mar 8 2025 at 11:04:19 [186340][-none-][DEBUG] Found cache backend SugarCacheZend
Sat Mar 8 2025 at 11:04:19 [186340][-none-][DEBUG] Found cache backend SugarCacheMemcached
Sat Mar 8 2025 at 11:04:19 [186340][-none-][DEBUG] Found cache backend SugarCacheMemcache
Sat Mar 8 2025 at 11:04:19 [186340][-none-][DEBUG] Found cache backend SugarCacheAPC
Sat Mar 8 2025 at 11:04:19 [186340][-none-][INFO] Found language file: en_us.lang.php
Sat Mar 8 2025 at 11:04:19 [186340][-none-][INFO] Found custom language file: en_us.lang.php
Sat Mar 8 2025 at 11:04:19 [186340][-none-][INFO] Query:SELECT id, name, symbol, conversion_rate FROM currencies WHERE status = ‘Active’ and deleted = 0
Sat Mar 8 2025 at 11:04:19 [186340][-none-][FATAL] Mysqli_query failed.
Sat Mar 8 2025 at 11:04:19 [186340][-none-][INFO] Query Execution Time:0.00041890144348145
Sat Mar 8 2025 at 11:04:19 [186340][-none-][FATAL] Query Failed: SELECT id, name, symbol, conversion_rate FROM currencies WHERE status = ‘Active’ and deleted = 0: MySQL error 1146: Table ‘suitecrm.currencies’ doesn’t exist
Sat Mar 8 2025 at 11:04:19 [186340][-none-][INFO] Query:SELECT category, name, value FROM config
Sat Mar 8 2025 at 11:04:19 [186340][-none-][FATAL] Mysqli_query failed.
Sat Mar 8 2025 at 11:04:19 [186340][-none-][INFO] Query Execution Time:0.00039410591125488
Sat Mar 8 2025 at 11:04:19 [186340][-none-][FATAL] Unable to retrieve system settings Query Failed: SELECT category, name, value FROM config: MySQL error 1146: Table ‘suitecrm.config’ doesn’t exist
Sat Mar 8 2025 at 11:04:19 [186340][-none-][DEBUG] Hook called: ::server_round_trip
Sat Mar 8 2025 at 11:04:19 [186340][-none-][DEBUG] Including module specific hook file for custom/modules
Sat Mar 8 2025 at 11:04:19 [186340][-none-][DEBUG] Including Ext hook file for custom/application
Sat Mar 8 2025 at 11:04:19 [186340][-none-][DEBUG] Calling MySQLi::disconnect()

I tried to change the legacy config.php > installer_locked to false. I have also checked the .env file > APP_ENV=prod.

Appreciate if anyone can help.

Thanks in advanced.

It seems as though a couple of tables are missing from your database, maybe you have some corruption?

I suggest checking some older database backups (assuming you have them) to see if they are there.

Missing tables:

  • config
  • currencies

Thanks for the replies.

This is how I obtained the backup from 7.14.6:

  1. Stop apache and mariaDB services.
  2. Copy the /var/www/html/SuiteCRM to the new suitecrm 8 server.

Not sure whether it is correct.

I have checked the old DB backup, i can see the config and currencies tables.

Thanks.

So, you’re moving the installation to a new server, not just upgrading?

You might benefit from reading this article, a bit old, but mostly still valid.

I don’t know how you got a database with two missing tables… maybe there are more missing?

Thanks for the advice. I am able to migrate and upgrade to the 8.8.0 without error during the upgrade.

But when I tried to access the suitecrm 8 page, it shows the directory page instead of the login page. I will check again in the forum and create a separate post if needed.

Thanks again.

You need to set root still /public in the web server.

Also, run permission commands again.

Clear symfony cache

Hi,

Do you mean set the /var/www/html/suitecrm/public folder to root:root?

I have also run the permissions and clear the symfony cache using the console:
sudo chmod -R 755 .
sudo chmod -R 775 cache custom modules themes data upload config_override.php

But when i launch the page http://{suitecrm8 IP}/suitecrm, it still show the index page. When the url is /suitecrm/public, it gave a blank white page.

Thanks.

I have rerun the migration again and managed to see the login page. Thanks.

Awesome! What did you do different this time?

This time I follow strictly the steps in the Migration - 7.12.x+ to 8.2.x+ (old) :: SuiteCRM Documentation and ensure the folders/files permissions are reset after each section.

Even though I am able to log in to the page, but I am not able to see the navigation menu. Besides that, it will show a blank page whenever I click on a link.

I tried to go to admin page via the manual URL method i.e. ?module=Administration, I was able to see the admin page but again, it will show a blank page whenever I click on a link.

I have stopped the test for now. Will test it again when free, or perhaps after the next release.