printAlbumZip

I'm currently hitting some roadblocks with trying to allow users to download albums in a zip file. I've tried adding:

<?php if (function_exists('printAlbumZip')) { printAlbumZip(); } ?>

to my album.php file (using zpSkeleton theme). The download link does appear on my page correctly, but everytime I click the link, I get a zip file of 0kb.

I've had issues with this since older installs, but haven't really dug into it until now. I'm using 1.4.2.3 now.

Any ideas/pointers?

Thanks.

Comments

  • acrylian Administrator, Developer
    You should review your server error logs.
  • Most likely there is not enough PHP memory to process the archiving of the album. There is a third party plugin that may help. Or you can try the development build. We use the download manager now to provide this feature.
  • acrylian Administrator, Developer
    The downloadList plugin to be specific..;)
  • Taking a look at my php setup, it looks like the memory_limit is set to 128M.

    I'm not sure where I can go to look for server error logs... Is that under /var/logs on a Ubuntu setup? Am i looking for php or apache logs?

    My work prevents me from accessing my server, so I will have to check when I get home today. Thanks for the help!
  • Okay, it is probably the PHP memory limit as you had mentioned. I don't know why I haven't tried before, but I just tried to download a smaller album (about 6 megs) and it worked fine. All my other albums are quite large, so they did not work.

    So should I just up the memory limit?

    I also found this doing a quick search, would this possibly help?

    http://gaffa.wordpress.com/2008/12/07/downloading-galleries-with-zenphoto/
  • acrylian Administrator, Developer
    Just upping the memory limit might be false info if the server does not really allow it. In any case you need as much memory as a zip file of the largest album will need. Also you need of course the additional web space (just to mention the obvious).

    The development nightly build as ZIP file generation by streaming on the fly within the downloadlists plugin that should be more memory friendly. You should try that. Other workaround of course is to generate the zip file manually and upload them.
  • Thanks for all of the replies. I don't want to try the development nightly just yet, I'll try that as a last resort since I have close to 10k photos on the server right now.

    I took a look through my apache's error log, and it looks like the .zip files are showing up as "not found". So I looked into each album's folder and sure enough, the ".zip" file was never created in the first place.

    I finally realized that I was using symlinks for my albums, and zenphoto didn't have permissions to create .zip archives in the folders where the pictures are actually stored. DOH. So there, that was my issue. Thanks again for the help!
Sign In or Register to comment.