title: PHP fopen gives intermittent error failed to open stream: No space left on device
body: <p>This is the strange error i came across, my php script intermittently gives error <strong>failed to open stream: No space left on device</strong> whenever i try to generate text file and write some user generated content in it. But my Disk have plenty of Space.</p>
  
  <p>Code i use is below:</p>
  
  <pre><code>$fp=fopen('../user1/dataProduct.txt','w');
  fwrite($fp, 'Demo Text of Products');
  fclose($fp);
  </code></pre>
  
  <p>If i do: df -H
  <img src="https://i.stack.imgur.com/718ce.jpg" alt="df -H Results"></p>
  
  <p>Error:
          <code>PHP Warning:  fopen(../user1/dataProduct.txt): failed to open stream: No space left on device in /home/goashopping/public_html/sell/userprod.php on line 192
  PHP Warning:  fwrite() expects parameter 1 to be resource, boolean given in /home/goashopping/public_html/sell/userprod.php on line 195</code></p>
  
  <p>Please help me in fixing this issue.</p>