Questions tagged [pclzip]

PclZip is a PHP library that offers compression and extraction functions for Zip formatted archives (WinZip, PKZIP).

From its website:

[The] PclZip [PHP] library offers compression and extraction functions for Zip formatted archives (WinZip, PKZIP).

PclZip gives you the ability to manipulate zip formatted archives. You can create an archive, list the content and extract all its content in the file system.

PclZip defines an object class which represent a Zip Archive. This class manages the archive properties and offers access method and actions on the archive.

References

15 questions
28
votes
9 answers

Wordpress theme upload error PCLZIP_ERR_BAD_FORMAT

I'm new to php as well as wordpress however because of some need I had to work with wordpress only. So just to start I read a tutorial and created a wordpress theme of my own and when I tried to upload my theme I got the below error: The package…
dShringi
  • 1,497
  • 2
  • 22
  • 36
4
votes
2 answers

ZIP a single big file in many calls using PHP PCL Zip

100 MB file --> 10 ZIP calls(10 MB zip per call) --> 1 ZIP file I should initiate 10 calls to add a single 100 MB file into Zip file (say 10 MB Zipping per call). Problem is we have a system with memory and time limit(which will not process more…
itsoft3g
  • 505
  • 1
  • 9
  • 27
2
votes
2 answers

Swedish characters (ÅÄÖ) gets messed up in PclZip zip files

I am using the "PhpConcept Library - Zip Module 2.8.2" (http://www.phpconcept.net/pclzip/), also called pclzip to create a zip file. I am running XAMPP on Windows 8.1. I am able to create an ok zip-file content-wise. However, file and foldernames…
2
votes
1 answer

Unexpected End of Archive When Zipping Files with PCLZip or ZipArchive

Currently wondering if anyone has experienced corrupt zip files. I'm currently using the following code // Multiple File Downloads require_once('includes/pclzip.lib.php'); $archive = new PclZip('archive.zip'); $v_list =…
jasenmp
  • 319
  • 6
  • 17
2
votes
2 answers

Unzipping to a variable

I need to process the contents of a zipped file, but I can't change the permissions on the server where my program will be hosted. This means that I can't download the zip file to the server, so I need to read the contents of the file into a…
Diego Saa
  • 1,426
  • 1
  • 13
  • 23
2
votes
1 answer

PHP - PCLZIP adding file from string

PCLZIP is a great library, but unfortunately it is poorly documented. I am using it in order to support also servers where ZipArchive is disabled (or php version not supported) I have a function to add uploaded files (one by one) to a ZIP…
Obmerk Kronen
  • 15,619
  • 16
  • 66
  • 105
1
vote
1 answer

A same folder zipped once using phpzip and once using PclZip, the checksums of the 2 files should be differents?

Below is my question : Zip a folder 'F' using phpzip => checksum MD5 of the zip file = X Zip the same folder 'F' using PlcZip => checksum MD5 of the zip file = Y (X # Y) is this normal ? Thanks in advance for your reply. BR
Houssam Hsm
  • 125
  • 5
1
vote
1 answer

Handling large compressed file in php

I'm trying to compress many images at once in my server. The size of the compressed file can range from 250MB-750MB I'm using pclzip library. I'm using shared hosting so max execution time and memory limit is limited. How can i solve this problem?…
Abhay Shukla
  • 33
  • 1
  • 7
1
vote
0 answers

PhpExcel won't create file on IE10

I am using PhpExcel to create files containing a variable amount of data. Here's how it works : The user selects a start date and an end date A list of profils is generated The user clicks on a button called "To Excel" and a file containing a list…
Lancelot
  • 573
  • 2
  • 5
  • 27
0
votes
1 answer

CodeIgniter force_download not downloading file, but printing garbage characters to the console

I am trying to pull data from my database, write CSV files, zip those CSV files and then download the zip. I have no trouble getting the files written to the server, and they look fine when I download them manually, but when I call force_download…
xanabobana
  • 63
  • 2
  • 16
0
votes
1 answer

How do I rename files in PclZip?

How do I rename the files I add to the archive? I have tried the following and it adds a file to the archive but I can't figure out how do rename. $archive = new PclZip('archive.zip'); $list = $archive->add($filepath); I know that I can use…
Peter Karlsson
  • 403
  • 5
  • 19
0
votes
1 answer

PCLZIP creates a zip which is blocked by Gmail because falsely interpreted as a zip containing an executable

I am using PCLZIP to create a ZIP that contains few documents and pdfs. On some machine, users are claiming zip to be corrupted. On my machines, I don't see ZIP to be corrupted, but whenever I try to send that zip via Gmail, it blocks the ZIP…
ksg91
  • 1,279
  • 14
  • 34
0
votes
1 answer

PCLZIP restructure file paths

I'm wondering if it's possible to remove a parent directory using PCLZip while the archive is loaded; without extracting it first and recompiling it. I can remove the parent directory in the archive using: $zip->delete(PCLZIP_OPT_BY_INDEX,…
atwellpub
  • 5,660
  • 11
  • 38
  • 52
0
votes
1 answer

PCLZip - Is it posttible to rename a folder in an archive before extraction?

I've a situation where I am downloading a zip and need to rename one of it's folders before I extract it. Is this possible using PCLZip?
atwellpub
  • 5,660
  • 11
  • 38
  • 52
0
votes
2 answers

download many archives for a server in one archive with php

I need to do an aplication to makes the user download a lot of pictures in the server choosing some criterias and only in one archive. i tried with php and pclzip.lib and zipstream libraries found on web, but none of the two methods work. with…