isset($_SESSION) Not Working on Remote Server
<p>I have a login page where user enters his username ans password. If successful I redirect him to index.php where I start a session:</p>

<pre><code>session_start();
</code></pre>

<p>from index.php he can navigate to a different page ("p1.php") and on top of "p1.php" I have this check:</p>

<pre><code>&lt;?php
if(!isset($_SESSION)) 
{ 
    exit;
} 
?&gt;
</code></pre>

<p>This works on my local server, but when I deploy this on remote server <code>!isset($_SESSION)</code> always returns true.</p>

<p>What could be happening here?</p>

<p>EDIT: I found on my hosting provider side a request to add this in php.ini:</p>

<pre><code>session_save_path("your home directory path"/phpsessions);
</code></pre>

<p>And to create a phpsessions folder in my path.</p>

<p>I did but that didn't help.</p>

<p>I tried to do this as well:</p>

<p>in index.php:</p>

<pre><code>session_start();
if(isset($_REQUEST['lecturer_id']))
{
    echo "lecturer_id set";
    $_SESSION['lecturer_id'] = $_REQUEST['lecturer_id']; // store session data
}
</code></pre>

<p>and in p1.php:
    session_start();
    if(!isset($_SESSION['lecturer_id'])) 
    { 
      exit;
    } </p>

<p>And the page always exits i.e. session variable is not defined</p>
