title: Imitate PHP sessions that write instantly
body: <p>I am having a difficult time troubleshooting a given script (the database queries are taking too long on a given server).  To "look" inside the servers when they were running, I thought I would just have the server write to a session periodically as it executes the script, and then have another PHP program display that session.  Unfortunately, it appears that sessions are really only written once for a given script (if there is a way to change this, please advise).</p>
  
  <p>An alternate would be to write to a DB, but as my whole purpose is to test the time it is taking the database, I would rather not.</p>
  
  <p>How would you recommend imitating PHP's session behavior, but so that the values are immediately written?  It doesn't have to be secure because it is just for testing.</p>