Support » Plugin: NextGEN Download Gallery » Error when trying to open downloaded zip folder

  • Resolved b531

    (@bridgetdesigns)


    Hi I just installed this plugin and everything seems to work fine until I actually download a zip file, then I cant open the .zip and I get this error:

    Windows cannot open the folder. The compressed (zipped) folder is invalid.

    Is there anything I can do to fix this. This plugin is perfect for what I need and I would really love to use it!

    http://wordpress.org/extend/plugins/nextgen-download-gallery/

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author webaware

    (@webaware)

    Can you try opening the .zip file with Notepad, to see if what you actually downloaded was an error message?

    cheers,
    Ross

    b531

    (@bridgetdesigns)

    Sure, I tried that and just got a entire page of symbols and squiggles like this “1žßδ¥9ÖPN×>Æ­D“‹ZŸZ·‚” , no error message as such.

    Plugin Author webaware

    (@webaware)

    Can you please email me the .zip file? You’ll find my email address on my contact page.

    cheers,
    Ross

    NB: about to bunk off work and have dinner and watch some silly TV, so I probably won’t get back to this until the morning…

    Hi,

    I have the same problem as well. Was there a resolution to this?

    Many thanks,
    Nichola

    Plugin Author webaware

    (@webaware)

    G’day Nichola,

    It sounds like the zip file is being truncated during download. Can you look in your web server error logs to see if there are any related errors?

    If you can’t easily check your error logs, turn on WP_DEBUG and WP_DEBUG_LOG in your wp-config.php file as per Debugging in WordPress, and look at the file wp-content/debug.log to see if anything is reported.

    cheers,
    Ross

    Hi, looked in both and nothing about next gen is referred to. When i turned off a plugin which was reporting an error the debug log wasn’t generated. The error logs on the host control panel has reported nothing since yesterday.

    I have 7-zip installed

    Thanks,
    Nichola

    Plugin Author webaware

    (@webaware)

    Are you able to provide a link to the website, so that I can look at the download file?

    cheers,
    Ross

    Thanks webaware for your plugin, it seems to be the one I needed. Unfortunately I have the same bug. I use WordPress 3.6. When I try to download pictures, I get the zip file but when I open it with WinRAR it tells me tha the end of the archive is incorrect.

    Could it be an issue with PclZip? Or something wrong with:

    header(‘Content-Description: File Transfer’);
    header(‘Content-Type: application/zip’);
    header(‘Content-Disposition: attachment; filename=’ . $zipName);
    header(‘Content-Transfer-Encoding: binary’);
    header(‘Expires: 0’);
    header(‘Cache-Control: must-revalidate’);
    header(‘Pragma: public’);
    header(‘Content-Length: ‘ . filesize($filename));
    readfile($filename);

    Thanks for helping

    Plugin Author webaware

    (@webaware)

    G’day gwenaelhagen,

    Are you able to send me an example .zip file to look at? My email address is on my contact page. If it’s too big, please load into a website or DropBox and send me a link.

    Can you check your web server error logs for errors? If that’s not easy, please enable WP_DEBUG and WP_DEBUG_LOG as described in Debugging in WordPress, and see what shows up in the debug.log file.

    One possibility is that the server won’t let you have a big enough temporary file when creating the zip file. You can try to fix this by adding this line to your wp-config.php file, below the lines that define ABSPATH:

    define('WP_TEMP_DIR', ABSPATH . '/wp-content/uploads/');

    cheers,
    Ross

    Thanks for your answer.

    I added define(‘WP_TEMP_DIR’, ABSPATH . ‘/wp-content/uploads/’); in my wp-config.php file and I commented the line in your plugin which deletes the tmp file. I checked that the tmp file was in ABSPATH . ‘/wp-content/uploads/ as wanted.

    I send you an email containing the tmp file and the downloaded zip right away.

    I really have to sleep since it’s really late in France. I’ll try to activate logging tomorrow.

    Plugin Author webaware

    (@webaware)

    G’day Gwenaël,

    Got your files, let’s see what the error logs say tomorrow. Sleep tight!

    cheers,
    Ross

    Thanks Ross.

    I enabled WP_DEBUG and WP_DEBUG_LOG and I found the following line in debug.log:

    Undefined variable: i in /wp-content/plugins/nextgen-download-gallery/templates/gallery-download.php on line 63

    I fixed it by added <?php $i = 0; ?> before the foreach but as I thought it didn’t fix my issue about downloading the zip.
    I’ll try to see if I can access my web server error logs.

    I found the logs but unfortunately there is nothing about errors caused by your plugin.

    Plugin Author webaware

    (@webaware)

    G’day Gwenaël,

    Can you please try replacing the plugin with this one? I suspect that your theme or one of your other plugins has output buffering turned on, and that is causing an out of memory error.

    https://dl.dropboxusercontent.com/u/26305751/nextgen-download-gallery.1.3.1-alpha1.zip

    cheers,
    Ross

    Hi,

    Same problem here.

    I have full res images which are about 4Mb (I’m using the filter to redirect the download to the full sized file).

    I can download 1 or 2 together, but beyond that my downloaded zip file is empty.

    I have tried adding WP_TEMP_DIR as described above, but still get a problem.

    Is there anything else I can try?

    Thanks,
    Rob

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘Error when trying to open downloaded zip folder’ is closed to new replies.