Undefined index: HEADERSYNC

Hello everyone. I’ve recently encountered an issue with our SuiteCRM installation that I was hoping someone could shed some light on. When trying to access the login page, I get the following stack trace error:

: Undefined index: HEADERSYNC occurred in /opt/bitnami/apps/suitecrm/htdocs/cache/smarty/templates_c/%%79^79D^79D9896D%%displayLoginJS.tpl.php on line 27 [2019-04-25 12:17:56] display_stack_trace caller, file: /opt/bitnami/apps/suitecrm/htdocs/include/utils.php line#: 3543

I’ve been doing some digging through the code of the stack trace and found that the SugarView.php file is supposed to set the headersync variable to point to a file called modules/Sync/headersync.js, which does not exist on my server. Any ideas? Thanks!

Hi firebee1991,

I’d suggest turning off PHP notices in your php.ini and restarting the server. E.g.

change error_reporting E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED to error_reporting(0);

I can, of course, look into and fix this notice but I’d recommend simply turning off the error reporting as most of these notices won’t actually affect the functionality and SuiteCRM can output dozens of notices on a single page.

Hi Dillon,

Thanks for your help. I edited /opt/bitnami/php/etc/php.ini, changed the error_reporting line as you suggested, and restarted, but I’m still running into the same error. On Google’s advice, I had also previously changed the display_errors to Off.

Thanks again,

I manged to figure this out so I figured I’d post the solution in case someone else runs into the same problem. I copied over the config.php and config_override.php files from another working instance and that fixed it. I ran a diff on the two files to see the difference and there was very little, the only two things that were different were that the ‘level’ => ‘info’, was set to ‘level’ => ‘debug’, and the js_lang_version was set to 3 instead of 4. Changed those two things and it came right back up.