|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-03-23 17:01 UTC] wendy dot umarov at free dot fr
Description:
------------
The actual 1.8.10 php-zip extension create an unreadable zip file for openoffice.org application.
Reproduce code:
---------------
ZipArchive::open("openoffice_file.odt");
ZipArchive::addFromString('content.xml',$valid_xml_content);
ZipArchive::close();
-> produce an unreadable document.
Sample at http://pastebin.mandriva.com/7659
Expected result:
----------------
A valid oasis document.
Actual result:
--------------
unreadable oasis document via OpenOffice 3.0.0
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 15:00:01 2025 UTC |
I encounter same problem under Windows XP 32-Bit, with wampserver PHP-5.2.9-2, using following code (and previous exemple code do the same): $zip = new ZipArchive(); $zip->open($outputfile, ZipArchive::CHECKCONS); $zip->deleteName('content.xml'); $zip->addFile($this->filename, 'content.xml'); $zip->close(); If I copy original ODT file, store new content.xml file using 7Z by exemple to this copy, archive is not corrupted. If I compare the properties of the content.xml in corrupted archive and in manual updated copy, compressed size of the corrupted file is less than the one obtained using manual method. File checksum seems to be same ?