Questions tagged [php-zip-archive]
70 questions
7
votes
4 answers
How can I install ziparchive on php 7.4?
I am running Virtuamin on centos 7, I am unable to install ziparchive on php 7.4, but when I switch to php 7.2, it works. I need php 7.4 to work because it is faster and wordpress script need 7.3+ to work effectively.

Puneet Chandhok
- 392
- 1
- 3
- 13
4
votes
0 answers
Install PHP ZIP extension in MAMP Pro
I am trying to Install PHP ZIP extension in MAMP Pro.
I followed many tutorials, and official one:
MAMP Documentation
But didn't get the job done at all.
Here's what I get when installing from terminal using sudo pecl install zip:
downloading…

CairoCoder
- 3,091
- 11
- 46
- 68
4
votes
1 answer
Zip extension is missing (Composer Update)
I wanted to update my Laravel app's dependencies using composer, but while entering composer update I receive an error for one of the dependencies ***** requires ext-zip * -> the requested PHP extension zip is missing from your system.
I check the…

Esmatullah Arifi
- 812
- 3
- 12
- 24
4
votes
3 answers
use PHP ZipArchive with file as variable
In a symfony Controller I have a file (UploadedFile object) as a variable.
I want to open this "variable" with php ZipArchive, and extract it.
But the open() methods is expecting a string, which is the filename in the filesystem. Is there any way…

Qonq
- 57
- 6
3
votes
3 answers
ZIP extension needs to be loaded for OpenCart - macOS Big Sur
I"ve upgraded my Mac with Big Sur OS. I'm trying to install opencart in my local laptop but getting error
ZIP extension needs to be loaded for OpenCart to work!
Have attaching the screenshot for reference. I"ve tried all the possible way to solve…

David
- 539
- 3
- 9
- 23
3
votes
0 answers
APNs "Extracting push notification package failed"
I followed the manual https://developer.apple.com/notifications/safari-push-notifications/. I use the PHP script to generate the required archive.
It is created and downloaded (the structure of the elements is the same as in the manual).
all my…

Sergey
- 53
- 1
- 6
3
votes
1 answer
PHP 7.2.7: Attempted to call an undefined method named "setEncryptionName" of class "ZipArchive"
I am attempting to create an encrypted, password protected ZIP file using PHP 7.2.7. However, I am getting the following error message:
Attempted to call an undefined method named "setEncryptionName" of class…

Magnanimity
- 1,293
- 8
- 24
- 44
3
votes
1 answer
PHP: ZipArchive::extractTo doesn't working (Errror)
I'm completely at a loss for explaining why this isn't working.
$filename = 'zipfile.zip';
$za = new ZipArchive();
$folder = DIR_UPLOAD . $filename;
$za->open($folder);
$za->extractTo(DIR_UPLOAD . 'unzip/');
$za->close();
Error:…

Miten Patel
- 121
- 2
- 12
2
votes
2 answers
How to add php zip to server, I'm using wordpress on google cloud platform
I have loaded wordpress on the google cloud platform and I am trying to transfer my wordpress site on my local to google. When I was loading the file it gave me the error message "Install a PHP zip on your server or contact your site host."
I saw a…

keeis2coo
- 23
- 4
2
votes
1 answer
Failed to build coreutils: command execution failed(form macports returned)
I'm trying to install php-zip via macports to my macOS.
sudo port install php73-zip
then the macports returns this message:
The following dependencies will be installed:
coreutils
...
...
Error: Failed to build coreutils: command execution…

yaokai
- 21
- 2
2
votes
1 answer
Creating zip of all directories and files in the same directory format
I am trying to make zip of array of files in the same directory format as it is in my computer the script I've written is working the only issue is that it is overwriting the first element of directory with the second one only the last element in…

Mohsin Abbas
- 630
- 8
- 29
2
votes
1 answer
What would cause unlink to return 'Resource Temporarily Unavailable'?
I'd like to create a .zip archive, upload it to Amazon S3, then delete the created .zip from the server. Steps 1 and 2 are working great, but the delete step is returning:
unlink(temp/file.zip): Resource temporarily unavailable
I've tried to unset…

WayneC
- 31
- 1
- 4
2
votes
1 answer
Change the name of my zip file created with php
I have a script for create zip with images. It works really well !
create_zip($files_to_zip, 'zip/download-'.$id_account.'-'.$time.'.zip');
function create_zip($files = array(),$destination = '',$overwrite = true) {
…

Kevie
- 55
- 5
2
votes
1 answer
Using the zip:// wrapper for an archive with a single file whose name is unknown
PHP allows to read ZIP files on-the-fly with the zip:// wrapper:
$fp = fopen ('zip://archive.zip#dir/file.txt', 'rb');
All good, when you know the compressed file name. This is not my case: my app has to deal with ZIP archives containing a single…

BenMorel
- 34,448
- 50
- 182
- 322
2
votes
2 answers
On creating zip file by php I get two files instead of one
I'm struggling around with a simple PHP functionality: Creating a ZIP Archive with some files in.
The problem is, it does not create only one file called filename.zip but two files called filename.zip.a07600 and filename.zip.b07600. Pls. see the…

Ingmar Erdös
- 517
- 8
- 18