php start session if not started
snippet in php

php start session if not started

user6054

if (session_status() == PHP_SESSION_NONE) {
    session_start();
}

php check if session started

user2840

<?php
if(session_status() == PHP_SESSION_NONE){
    //session has not started
    session_destroy();
}

php start session if not started

user1039

#you could just ignore warnings messages
@session_start();