php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52341 The created archive's name is appended '.a00564'
Submitted: 2010-07-15 03:40 UTC Modified: 2015-04-26 04:22 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: imyhchou at gmail dot com Assigned: cmb (profile)
Status: No Feedback Package: Zip Related
PHP Version: 5.3.2 OS: Window XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: imyhchou at gmail dot com
New email:
PHP Version: OS:

 

 [2010-07-15 03:40 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-07-19 13:09 UTC] aharvey@php.net
-Package: PHP options/info functions +Package: Zip Related
 [2015-04-16 13:34 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2015-04-16 13:34 UTC] cmb@php.net
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>
 [2015-04-26 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Jan 29 09:01:25 2020 UTC