php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63108 ZipArchive uncompress bug
Submitted: 2012-09-18 08:26 UTC Modified: 2012-10-08 11:17 UTC
From: sharqgm at gmail dot com Assigned: ab (profile)
Status: Not a bug Package: Zip Related
PHP Version: 5.3.17 OS: windows 7
Private report: No CVE-ID: None
 [2012-09-18 08:26 UTC] sharqgm at gmail dot com
Description:
------------
Some info: I use ziparchive because in my project (joomla) have a lot of small 
files and the upload time is too long (50-120 minute) 

What I did: 

 - Zipped a fresh copy of joomla
 - uploaded to the server
 - extratched by ZipArchive

My keywords and description metadatas are missing. It seems like there is a bug 
with the newline caracter, because when I see the source, there is just a mass of 
unformatted code, but on localhost OK. When I avoid this process and uploaded 
files directly everything ok. So the problem come from the ZipArchive.

(sorry for the poor description, I'm not prof, just wanted to notice :))

Test script:
---------------
     $zip = new ZipArchive;
     $res = $zip->open('un.zip');
     if ($res === TRUE) {
         $zip->extractTo('./');
         $zip->close();
         echo 'ok';
     } else {
         echo 'failed';
     }

Actual result:
--------------
Keyword and desc meta tag-s missing. 
New lines missing from the most part of the code.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-10-01 08:02 UTC] ab@php.net
I don't get exactly - is a zip file damaged after upload? Does zip ext extract it locally?

Were it possible you to post that zip file (or another one which causes the zip ext to work wrong)?
 [2012-10-01 08:21 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2012-10-01 08:22 UTC] ab@php.net
-Assigned To: +Assigned To: ab
 [2012-10-02 07:31 UTC] sharqgm at gmail dot com
-Status: Feedback +Status: Assigned
 [2012-10-02 07:31 UTC] sharqgm at gmail dot com
- extratched and zipped on local server
 - The zip compression is checked: OK. (filesize same)
 - After upload, the filesize is: OK.
 - After unzip, the filesize is: DIFFERENT...

Server: 25,822,309 Files: 4854 Dirs: 1131

Local : 18,258,381 Files: 4854 Dirs: 1131
Size on Disk: 30,134,453

File: Joomla_2.5.6-Stable-Full_Package.zip

Intresting... :S
 [2012-10-07 22:42 UTC] sharqgm at gmail dot com
OK. Thanks for your help. The problem caused by different things. I dont know yet 
what, but it related to joomla and not PHP. :)
 [2012-10-07 22:42 UTC] sharqgm at gmail dot com
-Status: Assigned +Status: Closed
 [2012-10-08 11:17 UTC] pajoye@php.net
-Status: Closed +Status: Not a bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC