Forum


Replies: 7   Views: 3409
Error upgrading from 3.1 to 3.2 - invalid zip object
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by rori  · 23-05-2013 - 17:44

I am trying to update phpdocx to the latest version for our site.  It currently works using version 3.1 Pro and I am attempting to upgrade to 3.2 Pro.



I renamed the folder for the old version and copied in the new (3.2) version into our web application to have it call the new code.  Trying out the site code, the new version gives an error when trying to call addDOCX: 



PHP Warning:  ZipArchive::getFromName() [<a href='ziparchive.getfromname'>ziparchive.getfromname</a>]: Invalid or unitialized Zip object in [...]\phpdocx\classes\CreateDocx.inc on line 7191



The stack trace pointed it at the addDOCX call, which is immediately following a CreateDocx() call:



$phpdocx = new CreateDocx();

$phpdocx->addDOCX('../tmpDocumentHolder/Descriptives.docx');



The zip extension is installed, as you can tell by the result of the provided check.php:



Your PHP version is 5.3.13 => OK

Your Zip extension version is 1.9.1 => OK

Your XSL extension version is 0.1 => OK

Your Tidy extension version is 2.0 => OK



So, I am not sure what to do next in order to get the version upgraded to 3.2.  The docx file we are trying to use with addDOCX worked fine before, and I can open it in a zip program externally so I do not think it is any obvious problem with the source document file.



Any help would be appreciated!