Description of problem: Using the PHP ZIP extension to create and adding files, httpd crashes. Version-Release number of selected component (if applicable): I'm running : - lib64zip2-0.11.2-1.mga4 - apache-mod_php-5.5.14-1.mga4 - apache-2.4.7-5.1.mga4 - php-zip-5.5.14-1.mga4 How reproducible: Here is a php sample code which should work correctly. <?php $za = new ZipArchive(); $flags = ZIPARCHIVE::CREATE; if ($za->open('/tmp/test1.zip', $flags) === TRUE) { echo "OPEN OK\n"; @unlink('/tmp/newfile.txt'); fopen('/tmp/newfile.txt', 'x+'); if ($za->addFile('/tmp/newfile.txt', 'newfile.txt') === TRUE) { echo "ADDFILE OK\n"; } } $za->addEmptyDir('tot/'); $za->addFromString('emptydir/newfile','mycontent'); $za->close(); Steps to Reproduce: 1. load the php script 2. httpd crashes Reproducible: Steps to Reproduce:
Sounds like another libzip issue (we fixed a similar issue with the update to 0.11.2). Strange though, Moodle uses php-zip to create zip files and it works fine. I guess it doesn't add files to an existing archive though.
CC: (none) => luigiwalserAssignee: bugsquad => oe
Hi, the addFromString function works perfectly. It may be the way moodle uses to create zip files. the addFile function makes the httpd crashes. Regards,
Hi, the error occurs with PHP 5.5.16 too. Only the function addFile is affected. The function addFromString works fine. I tried to add a file to a new created zip archive, not to an existing. Regards,
CC: (none) => rahel.neumann
This works in mbs1 with php-5.5.18 and libzip-0.10.1 (mga2). Please test php-zip-5.5.18-1.1.mga4 once it comes available. My quick test showed the PECL version worked so I replaced the bundled one with the PECL one from http://pecl.php.net/get/zip-1.12.4.tgz
Depends on: (none) => 14326
For reference: php-5.6.2 already has zip-1.12.4 so this problem should be fixed there.
Depends on: 14326 => (none)
Fixed by the update in Bug 14326.
Status: NEW => RESOLVEDResolution: (none) => FIXED