[PHP 7.2] My fix for «Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in lib/internal/Magento/Framework/Session/SessionManager.php on line 129»

How to fix it

Replace the lines:

with the following ones:

if (!$this->isSessionExists()) {
	// Enable session.use_only_cookies
	ini_set('session.use_only_cookies', '1');
}
1 Like