#48791 [Opn->Fbk]: open office files always reported as corrupted
| From: | cellog@php.net | Date: | Sat, 04 Jul 2009 05:46:37 +0000 |
| Subject: | #48791 [Opn->Fbk]: open office files always reported as corrupted | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-139243@lists.php.net to get a copy of this message | ||
ID: 48791
Updated by: cellog@php.net
Reported By: RalfBecker at outdoor-training dot de
-Status: Open
+Status: Feedback
Bug Type: PHAR related
Operating System: CentOS5.3
PHP Version: 5.3.0
New Comment:
please provide a link to an actual odt file that fails which I can use
in a test case to reproduce the problem (no GPL things in it please)
Previous Comments:
------------------------------------------------------------------------
[2009-07-03 18:02:13] pajoye@php.net
oops, no :)
------------------------------------------------------------------------
[2009-07-03 18:02:00] pajoye@php.net
duplicate #48763
------------------------------------------------------------------------
[2009-07-03 17:51:04] RalfBecker at outdoor-training dot de
Description:
------------
If I try to read content.xml of an odt file (just a few lines, tried
several files, created with different odt version on different
plattforms), it always fails with error message the zip file is
corrupted. Open Office itself, unzip or kde's ark can read it without
problem. So I think the problem is related the zip implementation in
phar.
I get the same result with php5.2.9 under openSUSE11.0.
Reading the directory with:
php -r "print_r(scandir('phar://test.odt/'));"
shows the files and gives no error or warning.
Reproduce code:
---------------
php -r "echo file_get_contents('phar://test.odt/content.xml');"
Expected result:
----------------
xml of odt content
Actual result:
--------------
PHP Warning: file_get_contents(phar://test.odt/content.xml): failed to
open stream: phar error: internal corruption of zip-based phar
"/root/test.odt" (local header of file "content.xml" does not match
central directory) in Command line code on line 1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48791&edit=1