Login page fatal error after upgrade

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.

Any assistance greatly appreciated.

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?

Thanks again for the assistance.

What is the exact message you have in your log about the files not copying?

There are two different situations and I just want to make sure we’re talking about the same thing before answering any further. Thanks

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

You need to figure out why it can’t create the files.

The permissions check in upgrade Wizard isn’t perfect, it basically tests if existing files are writeable, not if new directories can be created.

In Linux, permissions to create new dirs depend on the permissions of the parent dir, and the SetUID and SetGID bits on them.

You can also have .htaccess restrictions breaking this process.


I don’t think you can run the upgrade again. Check what you see in Admin / About: did your upgrade complete, or are you still in the previous version?

If you need to manually copy files, you’ll find them all in the upgrade zip, already with the same directory structure as the destination.

Good luck.

Ok - good to know. I will make the docroot writeable by the web server for next time, and copy over the missing files manually.

Thanks again for the assistance.

I just got this exact same error myself, and I solved it with “composer update” (which was the first thing I wrote in response to you)…