check if session is started php
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
Source:stackoverflow.com
php check if session is running
php start session if not started
#you could just ignore warnings messages
@session_start();