hell hansen 0 Light Poster

Hi guys i've one page which is hosted on cpanel!
and on my localhost is working properly, but on cpanel is not working.
The problem is about session and redirecting login, is not working how i want! my cod is:

<?php
session_start(); 
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of session
 *
 * @author jacinto joao
 */
//session start checking user if loged in or no!

//session_destroy();
if(isset($_SESSION['sami']))
{   

   //
   $session_name = $_SESSION['sami'];

}else{
    unset($_SESSION['sami']);
    header('location: login.php');
} 

Is someone there know how to deal with session in one shared host or in cpanel?