Login   Register  
PHP Classes
elePHPant
Icontem

Trouble on Mac Os

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Create ZIP File  >  All threads  >  Trouble on Mac Os  >  (Un) Subscribe thread alerts  
Subject:Trouble on Mac Os
Summary:Trouble on Mac Os
Messages:15
Author:Josué
Date:2008-02-14 01:12:00
Update:2010-04-13 11:34:42
 
  1 - 10   11 - 15  

  1. Trouble on Mac Os   Reply   Report abuse  
Picture of Josué
Josué
2008-02-14 01:12:00
When I try to open the zip file all is fine on Linux and Windows but not in Mac Os. I download de createzipFileMac.php

That's my code of a simple zip that i try to buid :

<?
include_once("CreateZipFileMac.zip.php");
$zip = new CreateZip;
$zip->addDirectory("something/");
header("Pragma: cache");
header("Expires: 0");
header("Cache-Control: private",false);
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"dothat.zip\";" );
header("Content-Transfer-Encoding: 8bit");
echo $zip->getZippedfile();
?>


  2. Re: Trouble on Mac Os   Reply   Report abuse  
Picture of Er. Rochak Chauhan
Er. Rochak Chauhan
2008-02-14 07:03:48 - In reply to message 1 from Josué
I guess there is no head to specify header in the code... The headers are mentioned in the class/method it self

  3. Re: Trouble on Mac Os   Reply   Report abuse  
Picture of Josué
Josué
2008-02-14 07:48:18 - In reply to message 2 from Er. Rochak Chauhan
Well I use the Header of the class , and the result is the same. The file can be opened on the Mac os :/ ...

  4. Re: Trouble on Mac Os   Reply   Report abuse  
Picture of Daniel O
Daniel O
2008-02-14 16:30:22 - In reply to message 1 from Josué
I am having the same difficulty. When I download on Windows it works fine. Then I move the file to a mac and it gives me a decompression error.

However, if I use StuffIt, the file opens perfectly! I also tried downloading it directly from the site and I get the same errors. This has nothing to do with the PHP headers.

Is the ZIP file encrypted at all? Is there some HEX that needs to be changed. I tried analyzing the HEX from a Mac created file and the PHP created file and there are a lot of differences, but none of them seem to be significant. Any ideas? I need this to open in the default Archive Utility on a mac.

Thank you for your help!

  5. Re: Trouble on Mac Os   Reply   Report abuse  
Picture of Daniel O
Daniel O
2008-02-18 14:22:57 - In reply to message 1 from Josué
Does anyone have any ideas about this? I have tried it on Tiger and Leopard with the same results.

  6. Re: Trouble on Mac Os   Reply   Report abuse  
Picture of Andi Keller
Andi Keller
2008-03-10 09:43:31 - In reply to message 5 from Daniel O
Hi Daniel,
I've got the same problems. Did you find a solution for this?

regards
Andi

  7. Re: Trouble on Mac Os   Reply   Report abuse  
Picture of MJ
MJ
2008-03-22 02:01:04 - In reply to message 1 from Josué
Same problem here.

Works with Stuffit Expander but not with Mac OS X's ZIP-Utility. Otherwise great!

  8. Re: Trouble on Mac Os   Reply   Report abuse  
Picture of licinio
licinio
2008-06-30 17:48:24 - In reply to message 7 from MJ
Same problem for me,
it works correctly for windows/linux, but it doesn´t work for mac

I´ve noticed that
CreateZipFileMac and CreateZipFile files are the same.
Maybe it´s a mistake?

thanks

  9. Re: Trouble on Mac Os   Reply   Report abuse  
Picture of JamesCovey
JamesCovey
2009-04-20 05:14:51 - In reply to message 8 from licinio
I'm having the same problem, and the mac file is the same, I compared them back to back.

  10. Re: Trouble on Mac Os   Reply   Report abuse  
Picture of David Klanac
David Klanac
2009-06-26 01:35:32 - In reply to message 8 from licinio
Yep. Windows and the shell 'unzip' binary in linux and mac osx is happy with the generated zip files. It's definitely a problem with the StuffIt Expander that is used by default on Leopard clients to extract zip files. Is there anything that can be done to fix this problem?

Here are my console messages in Leopard when trying to use the default extractor:

6/25/09 9:34:33 PM Archive Utility[2193] NSExceptionHandler has recorded the following exception:
NSFileHandleOperationException -- *** -[NSConcreteFileHandle writeData:]: Broken pipe
Stack trace: 0xa819a 0x91120e3b 0x906ffe8b 0x906ffeca 0x9543eed3 0x953c24db 0x1a242 0x14cd7 0x95329e0d 0x953299b4 0x90435155 0x90435012


6/25/09 9:34:33 PM Archive Utility[2193] failed to write to /usr/bin/ditto


6/25/09 9:34:33 PM [0x0-0xce0ce].com.apple.archiveutility[2193] ditto: Couldn't read PKZip signature

 
  1 - 10   11 - 15