#44201 [Opn->Asn]: Creating zip files cant use : in filename

From: Date: Thu, 21 Feb 2008 22:50:03 +0000
Subject: #44201 [Opn->Asn]: Creating zip files cant use : in filename
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-122560@lists.php.net to get a copy of this message
ID: 44201 Updated by: johannes@php.net Reported By: liamwheldon at gmail dot com -Status: Open +Status: Assigned Bug Type: Zip Related Operating System: 2003 Server & XP PHP Version: 5.2.5 -Assigned To: +Assigned To: pajoye New Comment: Assign to maintainer. Previous Comments: ------------------------------------------------------------------------ [2008-02-21 10:33:50] liamwheldon at gmail dot com 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 this bug report at http://bugs.php.net/?id=44201&edit=1

« previous php.bugs (#122560) next »