Bug #52341 [Opn->Fbk]: The created archive's name is appended '.a00564'
Edit report at https://bugs.php.net/bug.php?id=52341&edit=1
ID: 52341
Updated by: cmb@php.net
Reported by: imyhchou at gmail dot com
Summary: The created archive's name is appended '.a00564'
-Status: Open
+Status: Feedback
Type: Bug
Package: Zip Related
Operating System: Window XP
PHP Version: 5.3.2
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
I can't reproduce this behavior on recent PHP versions. Does the
issue still persist? Also check the documentation on
ZipArchive::addFile[1] and ZipArchive::CREATE[2].
[1] <http://php.net/manual/en/ziparchive.addfile.php>
[2] <http://php.net/manual/en/zip.constants.php>
Previous Comments:
------------------------------------------------------------------------
[2010-07-15 03:40:32] imyhchou at gmail dot com
Description:
------------
My enviroment is php5.3.1+IIS5.1+FastCGI. I execute the following code and get two files:
test.zip.a00564 and test.zip.b00564. Again I execute it and get two new files: test.zip.c00564 and
test.zip.d00564. After a moment to carry out it again, the end of the serial number of the
file's name is change as 01892, such that the two files' names are test.zip.a01892 and
test.zip.b01892.
Test script:
---------------
<?php
$zip = new ZipArchive;
$res = $zip->open('test.zip', ZipArchive::CREATE);
if ($res === TRUE) {
$zip->addFromString('test.txt', 'file content goes here');
$zip->addFile('data.txt', 'entryname.txt');
if ($zip->close()===TRUE)
echo 'Yes';
else
echo 'No';
} else {
echo 'failed';
}
?>
Expected result:
----------------
Yes
Generate the archive test.zip
Actual result:
--------------
No
Generate two files: test.zip.a00564 and test.zip.b00564
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=52341&edit=1
Thread (3 messages)