title: Unlink tempnam throws error "Resource temporarily unavailable"
body: <p>I want to unlink (delete) my temporary file but php throws the error :</p>
  <p><strong>Warning Error: unlink(<em>&quot;my file path&quot;</em>\Temp\TMPAF91.tmp): Resource temporarily unavailable in [<em>&quot;my file path&quot;</em>\myscript.php, line <em>&quot;number&quot;</em>]</strong></p>
  <pre><code>$tmpfile = tempnam(sys_get_temp_dir(), 'zipfile');
  
  file_put_contents($tmpfile, $content);
  
  $zip = new ZipArchive;
  
  if ($zip-&gt;open($tmpfile) === true) {
  // my code in here to extract the $content of the $tmpfile
  
    $zip-&gt;close();
  } 
  
  
  
  unlink($tmpfile);
  </code></pre>
  <p>I'm not sure what's happening here. The ZipArchive is closed so surely I should be allowed to unlink it.</p>