Questions tagged [ziparchive]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
37 views

PHP - Unexpected character in input: '' (ASCII=20) state=0

I have come across this error for the first time and can't seem to debug it. My code which concerns this error is as follows: function save_contract( $post_id, $post, $update, $post_before ) { ...
Orix's user avatar
  • 1
0 votes
1 answer
141 views

How can I find a big uploaded zip file in the Media library?

I need to upload big files 500 MG and more to my wordpress site so that these can be used as downloadable products on woocommerce plugin. I managed to connect my site to Fillzilla found the folder ...
ronin074's user avatar
  • 101
0 votes
1 answer
449 views

How to get files from loop for zip

I am working on a button which will download the images as a zip on specific posts. It works if I leave the files array in functions.php with a few hard-coded img links. But when I move the array to ...
Ben Blue's user avatar
  • 117
0 votes
2 answers
134 views

unzip_file not working with the remote file

I'm trying to use unzip_file to extract the remote archive with no success. It works only with the local path using get_template_directory() but with a remote zip archive URL I'm getting Incompatible ...
Alexander's user avatar
  • 133
0 votes
1 answer
277 views

Wordpress can't use ZipArchive

Im currently developing a site where customers can download brand images like packshots. Ive made a custom cart where the client should be able to download all images added to the cart using ...
fredriktv's user avatar
0 votes
1 answer
332 views

How to prepare (compress/zip) a plugin to enable updating instead of adding new instance?

I created my own plugins and install/update them by uploading the zip file in the dashboard. That worked well, but suddenly1 a new instance of the plugin gets added instead of updating the already ...
jost21's user avatar
  • 249
0 votes
1 answer
24 views

Upload Wordpress Plugin from ZIP Broken - Returns Symbols Squares & question marks

I am trying to upload plugins to my wordpress website. However, when I click "Install Now" my wordpress reloads and prints out a long string of symbols like this: #�EU퇘0'��������q=�y���������...
Nathaniel Fernandes's user avatar
0 votes
0 answers
184 views

Using unzip_file() to get contents of file

With each post, I save a zip folder as an attachment containing a json file with large amount of data. When looping through posts, I need to open this folder and retrieve the contents of json file but ...
Leopold's user avatar
0 votes
0 answers
322 views

Zip a file and add as attachment

I first add support for mime type attachments // ADD MIME TYPEs FOR ATTACHMENTS add_filter( 'upload_mimes', 'my_myme_types', 1, 1 ); function my_myme_types( $mime_types ) { $mime_types['txt'] = '...
Leopold's user avatar
1 vote
2 answers
116 views

Can a manually uploaded plugin be made to track updates from the WordPress.org plugin directory?

I've made a plugin which I will give to some users to test by manually uploading the zip file. I later on want to host the plugin in the WordPress.org plugin directory, but I want to avoid users ...
Sean's user avatar
  • 647
8 votes
3 answers
6k views

How to assign multiple file-mime-types to extension?

To allow extra file types for upload, we use: add_filter('mime_types', 'my_mimes'); function my_mimes($all) { $all['zip'] = 'application/zip'; return $all; } But how to assign multiple file ...
T.Todua's user avatar
  • 5,769
0 votes
1 answer
984 views

Download a zip folder of selected files

I'm trying to download multiple files from the server in a zipped folder. Here is the code I have thus far: HTML <form method="post"> <input type="checkbox" name="checked[]" value="<?...
Michelle M.'s user avatar
0 votes
1 answer
392 views

Why does unzip_file always return true but nothing happens?

I am trying to use the $wp_filesystem of WordPress to unzip a file located inside the wp-content/plugins and place it at the same location. However whatever I try the WordPress method unzip_file() ...
phpheini's user avatar
  • 133
1 vote
1 answer
219 views

How can I fix my server so core/plugins/theme update don't silently fail?

I run my own server and have a few dozen WordPress sites. Recently, many updates (plugin and core) have been silently failing. If I try to do the update from the updates page, I get a message like ...
Mark Barnes's user avatar
2 votes
1 answer
1k views

AJAX issue - Uncaught SyntaxError when processing Zip File

I'm creating an application that will allow a user to fill out a form and then have a customized zip file downloaded for them upon submit. I'm utilizing AJAX to accomplish this task. Build....
voodooGQ's user avatar
  • 429
3 votes
2 answers
3k views

How do you use unzip_file()?

I have been trying to use the unzip_file() function. It says undefined so I looked into it and the WP_Filesystem() must be called and set up. So easy, right? require_once(ABSPATH .'/wp-admin/includes/...
user1915665's user avatar
-1 votes
1 answer
22 views

Duplicating wordpress install issue

I wonder if anyone could help me with a problem that I am having. I am having a guy do some plugin/theme customization on my wordpress site and he wants to have a duplicate of the site to work with on ...
user2143915's user avatar
-3 votes
1 answer
105 views

What does the output of this plugin mean? [closed]

I just tried to compress a file and am not sure if it worked or not. The plugin I am using gave me the following results: adding: wp-includes/js/tinymce/plugins/wpeditimage/editimage.html (deflated ...
SamDom's user avatar
  • 129
2 votes
2 answers
2k views

How do you protect a premium theme from being copied?

I'm thinking of doing up a couple of premium themes, and selling copies of them. I've never done anything like this before, so I have a couple of questions. I appreciate that this is mainly a forum ...
snthr's user avatar
  • 191
0 votes
1 answer
179 views

What should I pass for $needed_dirs when calling _unzip_file_pclzip (aka PclZip)?

I'm trying to create a fallback method when ZipArchive is not present. I'm seeking to use the _unzip_file_pclzip() function contained in wp-admin/includes/file.php However, I'm not sure what is ...
Scott B's user avatar
  • 5,666