OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

how to get (corruption)details of a corrupted .odt file?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> Setup and Troubleshooting
View previous topic :: View next topic  
Author Message
lilewian
Newbie
Newbie


Joined: 19 Apr 2007
Posts: 3

PostPosted: Thu Apr 19, 2007 1:18 pm    Post subject: how to get (corruption)details of a corrupted .odt file? Reply with quote

Hi,

how can I detect what detail is corrupted in a corrupted .odt file?

My problem:
I've a .odt file dynamically created by php. Created by one server the file is ok (php5 as cgi) and created on another server the file is corrupted (php5 as mod_php).
When I open both files with an archiver, every singel file in both archives has exactly the same size (compressed and normal), but one is ok and the other one is in any way corrupted. And - curiosly - the archives have different sizes Shocked
When I open the corrupted .odt document with OO 2.0 (ubuntu edgy edge), OO starts to recover the document, but after recovering, the file is empty.
When I open the corrupted file with AbiWord, the content is correctly shown, but without header and footer. I checked the styles.xml from corrupted and ok archive with diff (linux utility), and it says the file are equal.

Here are both .odt files:
OK file: http://andis.mine.nu/oooforum/textfile_php5_cli.odt
Corrupted file: http://andis.mine.nu/oooforum/textfile_php5_modphp.odt

Here is a picture with the opened archives and details:
http://andis.mine.nu/oooforum/oooforum_details.jpg

Perhaps someone can tell me whats wrong with the corrupted file.

Thanks in advance
lilewian
Back to top
View user's profile Send private message
squenson
Super User
Super User


Joined: 09 Mar 2007
Posts: 690
Location: Nis, Serbia

PostPosted: Thu Apr 19, 2007 1:30 pm    Post subject: Reply with quote

lilewian,

I unzipped your corrupted file, then I zipped it again with Winzip. THis time, the file correctly opens in Writer, therefore I suppose that the zip process that was used is not 100% compatible with OOo format. Did you use a specific compression or method?
_________________
Help us to help you: Add [Solved] to the title of the thread if you agree with the answer
>>> Do you know the new OOo support forum http://user.services.openoffice.org/en/forum/index.php? <<<
Back to top
View user's profile Send private message
lilewian
Newbie
Newbie


Joined: 19 Apr 2007
Posts: 3

PostPosted: Thu Apr 19, 2007 1:48 pm    Post subject: Reply with quote

Hi,

I use File_Archive from PEAR packet http://pear.php.net/package/File_Archive
I programmed to open the zip file (odt file) extract content.xml, write content to the content.xml file, delete the original content.xml from the archive and add the new one.
Ok, I think I've to start here searching the bug - thanks for the hint. To rezip the unzipped odt file didn't came to my mind. Wink I have to try it out.

But why is the size of the archive different but the content is not? curious Rolling Eyes

Thanks for help.
lilewian
Back to top
View user's profile Send private message
squenson
Super User
Super User


Joined: 09 Mar 2007
Posts: 690
Location: Nis, Serbia

PostPosted: Thu Apr 19, 2007 1:55 pm    Post subject: Reply with quote

lilewian,

On top of the files themselves, a zip file contains some additional information, like the file name / date / folder, etc. I also guess there is a small overhead indicating this is a zip file. Therefore, it is possible that different zip tools provide different sizes of archive files, while the files themselves have the exact same compressed size.
_________________
Help us to help you: Add [Solved] to the title of the thread if you agree with the answer
>>> Do you know the new OOo support forum http://user.services.openoffice.org/en/forum/index.php? <<<
Back to top
View user's profile Send private message
lilewian
Newbie
Newbie


Joined: 19 Apr 2007
Posts: 3

PostPosted: Fri Apr 20, 2007 11:52 am    Post subject: Reply with quote

Hi,

I solved the problem.
It was not the corrupted .odt file.
I offer the dynamically created .odt for download by headers() and here was my fault.

Thanks for help
lilewian
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> Setup and Troubleshooting All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group