title: PHP fopen "failed to open stream: resource temporarily unavailable"
body: <p>EDIT: Austin below in the comments resolved my issue. How do I close the question since that is the answer?</p>
  
  <p>I have the following simple code to open/write to a query file on my server. I've checked permissions and even set +rw for all users on the query file, yet I still get the error</p>
  
  <blockquote>
    <p>failed to open stream: resource temporarily unavailable</p>
  </blockquote>
  
  <p>in my apache error log.</p>
  
  <p>I'm not really sure what I can do to alleviate this issue, thoughts?</p>
  
  <pre><code>&lt;?php 
  // filepaths
  $queryFile = '../query/query.txt';
  
  // get query
  $query = $_GET['searchBox'];
  
  // open and write query to query file
  $fh = fopen($queryFile, 'X') or die("Can't open file");
  fwrite($fh, $query);
  fclose($fh);
  </code></pre>