title: Problem saving edited zip archive (docx)
body: <p>So here is my code:</p>
  
  <pre><code>&lt;?php
  
  $zip = new ZipArchive;
  if ($zip-&gt;open('test.docx') === TRUE) {
  
   $xmlString = $zip-&gt;getFromName('word/document.xml');
   $xmlString = str_replace('$FIRST_AND_LAST_NAME', 'John Doe', $xmlString);
      $zip-&gt;addFromString('word/document.xml', $xmlString);
  
   echo 'ok';
  
      $zip-&gt;close();
  } else {
      echo 'failed';
  }
  </code></pre>
  
  <p>Its purpose is simple. It opens a test.docx file, searches for all occurences of a string "$FIRST_AND_LAST_NAME" and replaces them with "John Doe".</p>
  
  <p>It works perfectly on my Windows development server (the "John Doe" string is in the docuemnt when I open it).</p>
  
  <p>It does not work on my Lunux production server ("$FIRST_AND_LAST_NAME" string is still there, there is no "John Doe").</p>
  
  <p>There is no error or notice, the "ok" is printed without any errors. I made sure the test.docx file has priviledges set to 777.</p>