title: Windows 2019 and PHP 7.3: "session_start(): ps_files_cleanup_dir: opendir failed: No such file or directory (2)"
body: <p>Having this problem. I know there is similar questions, but none of them provided a solution.</p>
  
  <ul>
  <li>Windows Server 2019 server core</li>
  <li>PHP 7.3.7 x64 under IIS.</li>
  </ul>
  
  <p>Error message: </p>
  
  <blockquote>
    <p>PHP Fatal error: Uncaught ErrorException: session_start():
    ps_files_cleanup_dir: opendir(D:\TempPHP) failed: No such file or
    directory (2).</p>
  </blockquote>
  
  <ul>
  <li>The directory does exists and it is full of sessions files.</li>
  <li>There is FULL permissions (I know, security risk, but I'm first trying to make it work) for the application pool user (IIS AppPool...), IUSR, IIS_IUSRS, LOCAL SERVICE, LOCAL NETWORK, SYSTEM and CREATE OWNER.</li>
  <li>The error message seems to shows randomly.</li>
  </ul>
  
  <p>Some relevant php.ini settings:</p>
  
  <pre><code>session.gc_probability = 1
  error_log = "D:\TempPHP\PHP73x64_errors.log"
  upload_tmp_dir = "D:\TempPHP\upload"
  session.save_path = "D:\TempPHP"
  sys_temp_dir = "D:\TempPHP"
  </code></pre>
  
  <p>edit: "D:\" is a local partition. Not a mapped or a shared drive. Logs and sessions are being written successfully. It seems that php just can't remove those files.</p>