From: RalfBecker at outdoor-training dot de Operating system: CentOS5.3 PHP version: 5.3.0 PHP Bug Type: PHAR related Bug description: open office files always reported as corrupted
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 bug report at http://bugs.php.net/?id=48791&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48791&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48791&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48791&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48791&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48791&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48791&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48791&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48791&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48791&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48791&r=support Expected behavior: http://bugs.php.net/fix.php?id=48791&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48791&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48791&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48791&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48791&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48791&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48791&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48791&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48791&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48791&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48791&r=mysqlcfg