title: COM Word.Application in PHP
body: <p>I am creating a word document from a template using a web app I wrote in PHP (Yii Framework) using COM and I receive an error when I try to release the object</p>
  
  <pre><code>    $word = new COM("Word.Application") or die("Unable to instantiate Word");
      ....
      $word-&gt;Quit(); 
      $word-&gt;Release(); 
      $word = null; 
  </code></pre>
  
  <p>When I use the Release method I get Error [0x800706be] The remote procedure call failed. There are no errors in the Event Viewer and in fact it reports that Microsoft Office session lasted 17 seconds and session ended normally, word is not still active in task manager and the document is generated as per the code. My question is do I need to use the Release method - is Quit and setting the object to null sufficient? This is running on an Apache Server using PHP Version 5.4.7.</p>