Fix An active PHP session was detected and The REST API encountered an error

Fix An active PHP session was detected and The REST API encountered an error

Need to identify what plugin cause these issues.

find words in *.php ‘session_start

if (!session_id()) {
        session_start();
    }

Change to

if (!session_id()) {
        session_start( ['read_and_close' => true, ] );
}

Then save