Session regenerate id and session_save_path( );
<p>Hello I have this script below:</p>

<pre><code> &lt;?php
   session_save_path('sessions/');
    if (!isset($_SESSION)) {
    session_start();
    }
   $loginUsername = A;

   if (PHP_VERSION &gt;= 5.1) {session_regenerate_id(true); } else {session_regenerate_id();}
$_SESSION['wallet_email'] = $loginUsername;
   echo  $_SESSION['wallet_email']

?&gt;
</code></pre>

<p>Now I have noticed that once a new session id is generated, I lose the path specified in "session_save_path('sessions/')". This means I am unable to create new sessions.</p>

<p>I actually get the following error.</p>

<pre><code>Warning: Unknown: open(sessions//sess_7af5c5f2f2bd83afff0203cc45190260, O_RDWR) failed:    No such file or directory (2) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (sessions/) in Unknown on line 0
</code></pre>

<p>Please I need urgent help with this.</p>
