This might help people using virtual server or PHP cli version different than the executable PHP. I made some progress based on other posts. My environment is a virtualmin server and I was executing the command line as the wrong user. My user is “crm” and my group is “crm”.
Also, I found that the PHP cli version was 7.2 even though the installation php is 7.4.30. I was running the command line and 7.2 was causing one of the errors.
Running the CLI command:
> php -version
PHP 7.2.34 (cli) (built: Jun 7 2022 12:37:48) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.34, Copyright (c) 1999-2018, by Zend Technologies
Eventually, I ran the later version installed by calling
> php74 -version
PHP Warning: Module 'intl' already loaded in Unknown on line 0
PHP Warning: Module 'imagick' already loaded in Unknown on line 0
PHP Warning: Module 'ssh2' already loaded in Unknown on line 0
PHP 7.4.30 (cli) (built: Jun 7 2022 08:38:19) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.30, Copyright (c), by Zend Technologies
From there I was able to run the upgrade using PHP74 CLI
sudo -u crm php74 ./bin/console suitecrm:app:upgrade -t "SuiteCRM-8.1.2"
And that completed the Installation but failed at the Legacy Post Upgrade:
SuiteCRM Upgrade
============
Running: check-package
step: check-package | status: done
Package found in path
Running: extract-package
step: extract-package | status: done
Package extracted
Running: check-permissions
step: check-permissions | status: done
Permissions checked
Running: install-upgrade-package
step: install-upgrade-package | status: done
Successfully installed package
Running: run-migrations
step: run-migrations | status: done
No new migrations. Skipping
Running: legacy-post-upgrade
step: legacy-post-upgrade | status: failed
Unexpected error running Legacy Post Upgrade
============
The upgrade log shows it stalled at Upgrading User Preferences:
[2022-06-09 17:35:25] upgrade.INFO: step: legacy-post-upgrade | status: failed [] []
[2022-06-09 17:35:25] upgrade.INFO: step: legacy-post-upgrade | messages: [] []
[2022-06-09 17:35:25] upgrade.INFO: Unexpected error running Legacy Post Upgrade [] []
[2022-06-09 17:35:25] upgrade.INFO: step: legacy-post-upgrade | debug: [] []
[2022-06-09 17:35:25] upgrade.INFO: begin check default permissions . [] []
[2022-06-09 17:35:25] upgrade.INFO: end check default permissions . [] []
[2022-06-09 17:35:25] upgrade.INFO: begin check logger settings . [] []
[2022-06-09 17:35:25] upgrade.INFO: begin check logger settings . [] []
[2022-06-09 17:35:25] upgrade.INFO: begin check lead conversion settings . [] []
[2022-06-09 17:35:25] upgrade.INFO: end check lead conversion settings . [] []
[2022-06-09 17:35:25] upgrade.INFO: begin check resource settings . [] []
[2022-06-09 17:35:25] upgrade.INFO: begin check resource settings . [] []
[2022-06-09 17:35:25] upgrade.INFO: Call deleteCache [] []
[2022-06-09 17:35:25] upgrade.INFO: Upgrading user preferences start . [] []
I sense I’m probably close to a resolution. I had to execute one update to the database when running the Repair under Admin. I also only have 8.1.1 as the version when clicking ABOUT in the admin menu. There are so many errors that could be caught with a pre-check script and hopefully that will be included some day. Based on the posts for v8 upgrades, a precheck should look for user, group, execution permission, php version, proper home directory and the debug output should be amplified in detail to help track down install problems. It would help adoption of v8.