Headers have already been sent

When attempting to upgrade from Mautic 2.14.2 to Mautic 2.15.3 the process stops with the terminal ( PUTTY) displaying this message

[RuntimeException]
Failed to start the session because headers have already been sent by “/home/path to mautic/app/AppKernel.php” at line 377.

The upgrade fails and I am unable to access mautic.

Q A

| Mautic version | 2.14.2
| PHP Version 7.1.33
| Browser | Chrome

Steps to reproduce

check if there are any pending database migrations
php public_html/mailstudio/messages/app/console doctrine:migration:migrate

verify database schema
php public_html/mailstudio/messages/app/console doctrine:schema:update --force

Correct any issues before proceeding

per article on https://mauteam.org/

~ Contending with the error “…max 64 keys allowed” execute the following command
~ php public_html/mailstudio/messages/app/console doctrine:schema:update --dump-sql

manually execute the remaining queries on the database using PHPMyAdmin.
worked with on issue Adrian Urso @fakir22 to resolve issues. see item #6063

All issues cleared!

~ clear the Mautic cache:
php public_html/mailstudio/messages/app/console cache:clear

Visit Mautic UI to check if everything is running properly

Check
1.) Mautic logs ~~~ /home/pathe to mautic/app/logs ~~~ ++ no errors
2.) Apache logs ++ no errors
3.) PHP logs ++ no errors

~run php app/console mautic:update:find

~run php app/console mautic:update:apply
error message on terminal is

[RuntimeException]
Failed to start the session because headers have already been sent by “/home/path to mautic/app/AppKernel.php” at line 377.

in php log it is [2020-04-13 12:49:11] mautic.NOTICE: RuntimeException: Failed to start the session because headers have already been sent by “/path to mautic/app/AppKernel.php” at line 377. (uncaught exception) at /path to mautic/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php line 151 while running console command mautic:update:apply