Sessions in Codeigniter with PHP7
<p>The Problem is simple. If i use </p>

<pre><code>$this-&gt;session-&gt;sess_destroy();
$this-&gt;session-&gt;sess_regenerate(true);
</code></pre>

<p>i get an error:</p>

<pre><code>Message:  session_regenerate_id(): Cannot regenerate session id - session is not active
Filename: Session/Session.php
Line Number: 625
</code></pre>

<p>That only happens with PHP 7 and works with 5.6.
I figured that the parameter in the regenerate function is set to destroy the old session data when regenerating. When i leave out the sess_destroy() i don't get an error, but the session data is not destroyed and i can't log the user out.</p>