|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-08-26 02:19 UTC] Fedora at FamilleCollet dot com
Description: ------------ With new zip-1.7.1 (with php-5.1.5), opening an archive with ZIPARCHIVE::CREATE flag doesn't work. Probably because open mode passed to zip_open always = 0. Reproduce code: --------------- Example "create.php" from the source package. Expected result: ---------------- $ cd /tmp $ php ....php-pecl-zip-1.7.0/examples/create.php file <./test112.zip> OK numfiles: 3 status:0 Actual result: -------------- $ php ....php-pecl-zip-1.7.1/examples/create.php cannot open <./test112.zip> PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 05:00:01 2025 UTC |
Yes, i have write permission in /tmp. And the same script (the example for zip-*.tgz) works with version 1.7.0 in the same conditions. When I say "Probably because open mode passed to zip_open always = 0." It's because in version 1.7.0 we have (php_zip.c) the mode from the function args : if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &filename, &filename_len, &mode) == FAILURE) { return; } rsrc_int->za = zip_open(filename, mode, &err); And in version 1.7.1, we only have: rsrc_int->za = zip_open(filename, 0, &err); Cordialy