If you see an error such as the following in your php error log:
Warning: Unexpected character in input: '' (ASCII=2) state=1 in /var/www/html/crm/include/utils/mvc_utils.php(48) : eval()'d code on line 1
Warning: Unexpected character in input: ' in /var/www/html/crm/include/utils/mvc_utils.php(48) : eval()'d code on line 1
the source of the problem is in SugarCRM’s mvc_utils.php. This file contains (poorly) obfuscated code which does a variety of checks to supposedly insure that your copy of Sugar is genuine. De-obfuscating the code is trivial though. It’s so pointless it makes me wonder why Sugar bothered with it in the first place, especially since it’s buggy.
I’ve shared the de-obfuscated version of the file below. This was done with version 5.2.0l but should work for other versions.
Drop the file in include/utils/ in the Sugar document root, after renaming your existing one to mvc_utils.php.old 🙂