I recently upgraded from 7.8.25 to 7.10.13 and now the log in page (/index.php) throws a fatal error:
PHP Fatal error: Uncaught Error: Class 'SuiteCRM\\Utility\\SuiteLogger' not found in /include/utils/recaptcha_utils.php:206\nStack trace:\n#0 /modules/Users/Login.php(163): displayRecaptcha()\n#1 /include/MVC/View/SugarView.php(818): include_once('/home/matt/publ...')\n#2 /include/MVC/View/views/view.classic.php(72): SugarView->includeClassicFile('modules/Users/L...')\n#3 /include/MVC/View/SugarView.php(211): ViewClassic->display()\n#4 /include/MVC/Controller/SugarController.php(435): SugarView->process()\n#5 /include/MVC/Controller/SugarController.php(375): SugarController->processView()\n#6 /include/MVC/SugarA in /include/utils/recaptcha_utils.php on line 206
Looking at the recaptcha_utils.php file, it is importing the logger via this line:
use SuiteCRM\Utility\SuiteLogger as SuiteLogger;
. Later on line 206 it tries to instantiate this class, and that’s what’s causing the fatal error.
It appears the problem is that the logger class isn’t being autoloaded earlier in the request. Can anyone point me in the right direction as to why this class isn’t being loaded normally as it should? Is this the result of something not being properly upgraded?
More information about my set-up:
Ubuntu 16.04
Apache 2.4.18
MySQL 5.7.25
SuiteCRM 7.10.13
The site is on a VPS that I manage. I have full root access including ssh. The CRM has been running for a few years, this problem only started after the upgrade.
I have tried doing a Repair, and have also reset all the file / directory permissions. Neither makes any difference.
When upgrading, did you see an instruction to run “composer update”? If so, did you do it?
Do you have any code customizations that might be interfering? These are also listed during upgrade. In your upgradeWizard.log you can refer back to that list.
Thanks - I checked the UpgradeWizard.log and there were errors regarding files not being copied. I suspect the upgrade was trying to create new files in the root of the docroot, and it didn’t have permission.
Can I manually copy these files from somewhere? Are they part of the upgrade patch zip? Or is it safe to do the same upgrade again?
Also, I ran the upgrade wizard from the admin area. The first step is to check file permissions. I just reran this and it didn’t report any problems about the docroot not being writeable. Is this a bug? Also, the wizard didn’t report any errors and said it completed successfully. Clearly, this wasn’t the case. Do I need to manually check the upgradeWizard.log file every time?
Here is one of the lines - it’s the one that refers to the SuiteCRM logger that’s causing the error mentioned above. Note that there are about 400 lines like this one. They all appear to be new directories in the docroot that couldn’t be created:
Sat, 02 Feb 2019 08:40:15 +0000 [UpgradeWizard] - *** ERROR: could not copy file: /home/xxxx/public/xxxx/public/docroot/lib/SuiteCRM/Utility/SuiteLogger.php