php Session Problems

I have a problem with my Website. It’s not passing session variables between pages. I made a simple 2 files to pass session variables between them but it’s not working.
page1.php code as follows

    <?php
        session_start();
        $_SESSION['id']='3';
        $_SESSION['name']='sameer';
        header('location:page2.php');
        exit();
    ?>

page2.php code as follows

    <?php
        session_start();
        echo $_SESSION['id'].'<br>';
        echo $_SESSION['name'];
        echo 'finish';
    ?>

in my localhost it’s working and showing the two variables and say finish.

in my hosting server it says only finish without passing the variables.

I tried with my hosting technical support team but they did not solve the problem.

is there anything to do to let the server pass the session variables between these two pages.

Thanks