Questions tagged [php-zip-archive]

70 questions
0
votes
1 answer

DrupalGap "Install SDK" Error: Fatal error: Class 'ZipArchive' not found in /../../.. /sites/all/modules/drupalgap/drupalgap.module on line 461

I am new to DrupalGap and while configuring DrupalGap I encountered the following error: Fatal error: Class 'ZipArchive' not found in /../../.. /sites/all/modules/drupalgap/drupalgap.module on line 461 Reproduce Error Navigate to…
0
votes
1 answer

PHP zip image from URL and download to local

I use the following code to zip the online image and download the zip file to local. But show "file not exist". $url = "http://www.google.com/intl/en_ALL/images/logo.gif"; $zip = new ZipArchive; $zipname = sys_get_temp_dir() . "/" . time() .…
Howard Hee
  • 909
  • 1
  • 13
  • 29
0
votes
1 answer

$zip->addFile on my Server doesn't create folders but only file path

usually the following script to create and fill a zip archive works properly, both on localhost and on other servers: $zip = new ZipArchive(); $zip->open($filename, ZipArchive::CREATE); foreach( $pathToAssets as $nPath ) { $files = new…
0
votes
1 answer

Downloading multiple files using PHP ZipArchive

I am trying to randomly download some files. I apologize because I posted it earlier but can someone explain what I am doing wrong in detail? I can not seem to debug it as I know minimal php.
Nick Garver
  • 527
  • 1
  • 5
  • 18
0
votes
2 answers

PHP: $zip->addFile issues

I have written a simple script to add files to an archive. After much head scratching I can't get the script to work. I have a php file here which reads from a check-box, the file/s selected in the check-box are added to the array $file. $path = ('a…
Liam Fell
  • 1,308
  • 3
  • 21
  • 39
0
votes
1 answer

ZipArchive download failed

I'am using ZipArchive class to generate and download zipFile. It must be work on php 5.2.14. It works perfectly on php 5.3.x with this code: $filename = "test.zip"; $zip = new ZipArchive(); $opened = $zip->open($filename, ZIPARCHIVE::CREATE |…
Adriano Foschi
  • 648
  • 1
  • 8
  • 23
0
votes
1 answer

How check if directory already added to ZipArchive during creation?

Usually, to check for a directory, you would use $zipArchive->locateName( "dirName" ); but while the zipfile is being created, this does not work. Is there a way to check the zip file during creation for directories? Does not work: $zip = new…
Don Rhummy
  • 24,730
  • 42
  • 175
  • 330
-1
votes
1 answer

cannot install php5.6-zip on ubuntu 16.04

currently I want to update my old php 5.6 application in ubuntu xenial 16.04.6 with php5.6-zip extension. sudo apt-get install php5.6-zip E: Unable to locate package php5.6-zip E: Couldn't find any package by glob 'php5.6-zip' E: Couldn't find any…
-1
votes
1 answer

ZipArchive::CREATE is not creating a zip file and returning true

Hello i am just creating a zip file using php but the file not being created however it is return boolean true i dont know whats problem going on. before created what did i do i installed php zip in my Ubuntu using sudo apt-get install php-zip and…
Shakti Sisodiya
  • 218
  • 2
  • 5
  • 14
-2
votes
1 answer

ZipArchive is not working in sever but working in localhost

the code below is working in localhost, but not working in server. $zip = new ZipArchive(); $zip_name = $_POST['zip_category_name'] . $student_id . ".zip"; $zip->open($zip_name, ZipArchive::CREATE); $res =…
Anvin
  • 49
  • 8
1 2 3 4
5