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.
Hi,
I would like to use the template function in order to make life easier for my end users. However, as soon as I start using addTemplate('path/template.docx') the following warnings show up:
[quote]
Warning: ZipArchive::addFile() [ziparchive.addfile]: Invalid or unitialized Zip object in /var/www/view_extensions/php_docx/v2.6_pro/classes/CreateDocx.inc on line 6148
(...)
Warning: ZipArchive::close() [ziparchive.close]: Invalid or unitialized Zip object in /var/www/view_extensions/php_docx/v2.6_pro/classes/CreateDocx.inc on line 4314
[/quote]
The files itself get created and seem to be OK (no error when opening them etc).
Any help would be appreciated.
Hey.
You need to enable Zip extension in your php.ini file and restart web server.
Hi!
zip is activated and works fine - the messages only show up when I use the "addTemplate" function. If I just create docx files everything is working as expected.
Kind regards,
Johannes
Hello,
Seems your DOCX is not a valid ZIP file. Please contact us and send your docx file to test it.
Regards.
Hi,
I use a very basic docx file in the meanwhile which only contains the names of the var's. That should not be the issue... Howerver, I have uploaded the document for your inspection: http://www.security-blog.eu/wp-content/uploads/2012/09/temp.docx
Furthermore, the first document in the loop is getting created just as it should and based on the (basic or complex) template.
Kind regards,
Johannes
Hello,
Please check
http://www.phpdocx.com/help/forum?vasthtmlaction=viewtopic&t=291.0
Regards.