The Mac produces an error:
when unzipping any file archived via the zip file class originally posted as a Zend tutorial.Unable to unarchive "xxx.zip" into "xxx".
(Error 1 - Operation not permitted.)
If you look in the Mac console you'll see an error:
ditto: Couldn't read pkzip signature.
It'd be nice if the UI gave that error rather than "Operation not permitted", but I digress.
The problem is apparently the fault of the example code the Zend consultant gave, as it's not meeting the ZIP file specification properly and Apple's app can't cope (just about any other unzip app will work though, including on the command line). The Zend code has these lines (I'm talking about the set immediately after $fr .= $zdata;):
$fr .= pack("V",$crc);
$fr .= pack("V",$c_len);
$fr .= pack("V",$unc_len);
To solve the problem just strip the 3 lines I identified.
I'm going to point the article author to this blog post. I think my interpretation of the spec is correctly in Apple's favour, and the fix certainly works. At first I thought it was Apple's fault but I then realised the General purpose bit flag was actually blank and thus not indicating the existence of the Data descriptor section.