title: PHP SQLite PRAGMA journal_mode = wal and readonly users
body: <p>I read that WAL mode allows a user users to read while during a write session.<br>Therefore I should be able to have 3 sessions reading data and one writing data at the same time, This sounds like a good thing for my use, so I figured I should define the session type so the system knows if this session is a reader or a writer using the connection flag.<br>
  <a href="http://php.net/manual/en/sqlite3.open.php#refsect1-sqlite3.open-parameters" rel="nofollow noreferrer">http://php.net/manual/en/sqlite3.open.php#refsect1-sqlite3.open-parameters</a><br>
  It states here that if the session is not closed cleanly that the <code>-shm</code> and <code>-wal</code> files are not removed<br>
  <a href="https://www.sqlite.org/tempfiles.html#write_ahead_log_wal_files" rel="nofollow noreferrer">https://www.sqlite.org/tempfiles.html#write_ahead_log_wal_files</a><br>
  After a read session the temporary files are not removed, thus meaning the session was not cleanly closed despite calling the close function and it returning <code>true</code>, so why are the files not being deleted when using the <code>SQLITE3_OPEN_READONLY</code> flag? Should I even use a flag at all?</p>