title: PHP7.0 session handler problems (Permission denied and function table is corrupt)
body: <p>I'm on WAMP PHP7.0.11 and find that my custom file based session handler fails regularly (but not all the time), with the error </p>
  
  <pre><code>SessionHandler::read(): open(C:\WINDOWS\TEMP\xxxxx) failed: Permission denied (13) 
  </code></pre>
  
  <p>After I encounter this, I need to restart WAMP to resolve the problem.</p>
  
  <p>The error message points at the custom Session class (which extends SessionHandler) and is the read method:</p>
  
  <pre><code>public function read($id) {
      //return mcrypt_decrypt(MCRYPT_3DES, $this-&gt;key, parent::read($id), MCRYPT_MODE_ECB);
  
      return $this-&gt;getDecrypt(parent::read($id), $this-&gt;key);
  }
  </code></pre>
  
  <p>Also, sometimes I get the following</p>
  
  <pre><code>PHP Fatal error:  session_set_save_handler(): Session 
  handler's function table is corrupt in... &lt;line pointing to 
  a call to "session_set_save_handler"&gt;
  </code></pre>
  
  <p>As I say, it doesn't happen every time, but maybe one in 20 page calls.
  Does anyone know what might be wrong with this setup?</p>