From:             
Operating system: Window XP
PHP version:      5.3.2
Package:          PHP options/info functions
Bug Type:         Bug
Bug description:The created archive's name is appended '.a00564'

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 bug report at http://bugs.php.net/bug.php?id=52341&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=52341&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=52341&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=52341&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=52341&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52341&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=52341&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=52341&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=52341&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=52341&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=52341&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=52341&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=52341&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=52341&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=52341&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=52341&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=52341&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=52341&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=52341&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=52341&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=52341&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=52341&r=mysqlcfg

Reply via email to