| View previous topic :: View next topic |
| Author |
Message |
lilewian Newbie

Joined: 19 Apr 2007 Posts: 3
|
Posted: Thu Apr 19, 2007 1:18 pm Post subject: how to get (corruption)details of a corrupted .odt file? |
|
|
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
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 |
|
 |
squenson Super User


Joined: 09 Mar 2007 Posts: 690 Location: Nis, Serbia
|
Posted: Thu Apr 19, 2007 1:30 pm Post subject: |
|
|
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 |
|
 |
lilewian Newbie

Joined: 19 Apr 2007 Posts: 3
|
Posted: Thu Apr 19, 2007 1:48 pm Post subject: |
|
|
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. I have to try it out.
But why is the size of the archive different but the content is not? curious
Thanks for help.
lilewian |
|
| Back to top |
|
 |
squenson Super User


Joined: 09 Mar 2007 Posts: 690 Location: Nis, Serbia
|
Posted: Thu Apr 19, 2007 1:55 pm Post subject: |
|
|
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 |
|
 |
lilewian Newbie

Joined: 19 Apr 2007 Posts: 3
|
Posted: Fri Apr 20, 2007 11:52 am Post subject: |
|
|
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 |
|
 |
|