I have referred this question how to start session in wordpress
With this code generated below critical issue.
<?php
add_action('init', 'register_my_session');
// session function
function register_my_session(){
if( !session_id() ) {
session_start();
}
}
// calling session function
register_my_session();
?>