Warning ini_set(): Headers already sent 3.0.2 -> 3.1.2

When I try to upgrade from OJS 3.0.2 to 3.1.2, I get a whole bunch of warnings from my classes/session/SessionManager.inc.php, stating: “PHP Warning: ini_set(): Headers already sent. You cannot change the session module’s ini settings at this time in /data/ojs-3.0.2/lib/pkp/classes/session/SessionManager.inc.php on line 35”
Anyone please?

Session will hereby be nullified and I then get the following error:
PHP Warning: session_start(): Cannot start session when headers already sent in /data/ojs-3.0.2/lib/pkp/classes/session/SessionManager.inc.php on line 58