SuiteCRM upgrade from 7.8.18 LTS to 7.10.9 failed

Hi! Tried to update our second instance of SuiteCRM 7.8.18 to 7.10.9. Upgrade ended to white screen and now it gives error 500. Apache error log is filled with these:

] PHP Fatal error: Cannot redeclare class ExternalAPIFactory in /SugarCE-Full-6.5.8/include/externalAPI/ExternalAPIFactory.php on line 53

Yes, our instances have been updated several times from SugarCRM. Other instance update went successfully but this failed. We run SuiteCRM on Debian Jessie linux and thus have rather old PHP 5.6 still in use. The other instance runs on the same server, so PHP version, apache config etc. is not the problem here. File permissions have already been checked and cache has been cleared, but no help.

I can’t find differences between require/include for the ExternalAPIFactory.php in working and non-working environments. If anyone has anything that could be checked, I’d be grateful!

Try searching your entire tree for the class declaration. I only get one result; you will likely get two, one of them in something you did under “custom”, maybe?

Run this from the root of your SuiteCRM installation:

grep -irn ExternalAPIFactory . | grep -i class

But it could be more complicated than this, maybe a double require is causing the same line to run twice, redeclaring the class.