From: liamwheldon at gmail dot com
Operating system: 2003 Server & XP
PHP version: 5.2.5
PHP Bug Type: Zip Related
Bug description: Creating zip files cant use : in filename
Description:
------------
I recently came across an issue when creating zip file son the fly where
windows XP built in zip archive viewer show'd no files within the archive
yet Winrar show'd the files fine. I have found the issue to be in the time
stamp as there is a ':' between hour and minute, once removed this works
fine in XP zip archive viewer.
Reproduce code:
---------------
unlink('E:/liam/bksbvalidation/bksb_results.zip');
$zip = new ZipArchive();
$filename = 'E:/liam/bksbvalidation/bksb_results.zip';
if ($zip->open($filename, ZIPARCHIVE::CREATE)!==TRUE) {
exit("cannot open <$filename>\n");
}
$zip->addFile('E:/Liam/keyskillbuilder/trials/bksb Initial
Assessment/Results/HTML/5bf57268_liam wheldon_1.html', 'Initial assessment
result 20th Feb 2008 9:37.html');
$zip->close();
Expected result:
----------------
I would expect to receive and open a readable zip archive
Actual result:
--------------
The zip archive wont open in windows XP zip archive viewer yet all 3rd
party zip readers work, yet show the file as not being HTML.
--
Edit bug report at http://bugs.php.net/?id=44201&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=44201&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=44201&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=44201&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44201&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=44201&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44201&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44201&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44201&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44201&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44201&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=44201&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=44201&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44201&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44201&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44201&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44201&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44201&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44201&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44201&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44201&r=mysqlcfg