Unable to download zip files

Hello,

What a nice piece of software. Thanks.

Previously, I had an 1.2.6 installation of ZenPhoto, and it worked well, including the printAlbumZip function. I perforemed a new installation with 1.4.2.1, and I continue to use the printAlbumZip()-Function.

Now, it only returns an about 990 Byte-File with no content. This is independent of the fact whether a valid zip-file already exists in the album-directory or it has to be created.

Does anybody have an idea?
(I am using php 5.3 and MySQL 5.x, but the problem wasn't different with php 5.2).

Thanks, Fabio

Comments

  • acrylian Administrator, Developer
  • fava64 Member
    Thanks, I saw this topic already. But I don't think there is an argument for a memory problem, because:
    - it worked before the version update
    - lots of zip-files are already generated and present on the server but not downloaded
    Fabio
  • acrylian Administrator, Developer
    Did you try a direct download? Are there errors in your server error log or anywhere else? Did you try 1.4.2.3?

    Sorry, besides that I have no idea right now. Seems to be working for me.
  • fava64 Member
    The Link in the Gallery:
    http://www.xy.z/zen/zp-core/album-zip.php?album=2009_07_13_Innichen
    does not work.
    The direct Link:
    http://www.xy.z/zen/albums/2009_07_13_Innichen.zip
    works well.
    In this example, the zip-file already exists.
    With an non-existing zip-file, no file is generated on the server with the gallery-link and the output is the same.

    The server where zenphoto is installed is a virtual server hosted by infomaniak.ch; therefore I don't have any acces to the log files (or I don't know how to access).
    I have not yet tried to update to 1.4.2.3, but logically, it is the next thing I have to do.
    Thank you for your follow-up.
    Fabio
  • acrylian Administrator, Developer
    Sorry, I have no idea. But you really should get access to your server logs, that is important not only for this.
  • spontex Member
    Same bug here with ZenPhoto 1.4.1.6. I am also hosted by infomaniak.ch. Mutualized hosting does not allow to read the server PHP logs. However, there should exist some ZenPhoto logs (same as "Security log" and "Setup log").

    The empty files contain the following warning messages, which seem to show that no .zip file was generated:


    <b>Warning</b>: filesize() [function.filesize]: stat failed for /home/www/bb680d9d37a9f4cbbc9e7ec067a53ef7/web/user_name/zenphoto/albums/album_name/.zip in <b>/home/www/bb680d9d37a9f4cbbc9e7ec067a53ef7/web/user_name/zenphoto/zp-core/album-zip.php</b> on line <b>84</b>

    <b>Warning</b>: filesize() [function.filesize]: stat failed for /home/www/bb680d9d37a9f4cbbc9e7ec067a53ef7/web/user_name/zenphoto/albums/album_name/.zip in <b>/home/www/bb680d9d37a9f4cbbc9e7ec067a53ef7/web/user_name/zenphoto/zp-core/functions.php</b> on line <b>566</b>

    <b>Warning</b>: fopen(/home/www/bb680d9d37a9f4cbbc9e7ec067a53ef7/web/user_name/zenphoto/albums/album_name/.zip) [function.fopen]: failed to open stream: Aucun fichier ou répertoire de ce type in <b>/home/www/bb680d9d37a9f4cbbc9e7ec067a53ef7/web/user_name/zenphoto/zp-core/functions.php</b> on line <b>569</b>

    <b>Warning</b>: unlink(/home/www/bb680d9d37a9f4cbbc9e7ec067a53ef7/web/user_name/zenphoto/albums/album_name/.zip) [function.unlink]: Aucun fichier ou répertoire de ce type in <b>/home/www/bb680d9d37a9f4cbbc9e7ec067a53ef7/web/user_name/zenphoto/zp-core/album-zip.php</b> on line <b>87</b>

    I could solve this bug by recursively giving the write access rights to the albums directories using a FTP client such as FileZilla. I always use FTP upload so I never needed to have the "web user" to be able to write in these directories.
  • spontex Member
    Solved here by giving the recursive write access rights to the albums directories by using a FTP client such as FileZilla.
  • fava64 Member
    Hi spontex,
    In fact, you can access some error messages on infomanik via your browser on:
    http://yoursite/http-errors (and log in as admin)
    On this site, I saw the same error massage as yours.
    In fact, I have a lot of problems with access rights, because the server uses the user httpd and creates new files and folder with this owner, but I can't change this users rights. The user httpd is not part of the same group as my ftp-accounts/users; I only can change the owner of new files and folder from httpd to an other user. So, most CMS only works with 777-permissions. What are the access permissions you gave to the album-folders? 755? 775? 777?
    Thanks
    Fabio
  • fava64 Member
    OK, I have tested 2777 on the folder album; know something happens. But infomaniak limits the execution-time for a script to 10 seconds (and 125 MB). Is it possible to create zip-files without using the installation-permission (which is limited to 10 usages per year)?
    Or do I have to create zip-files at home and then to upload them?
    A test shows that already existing zip-files can be downloaded now.
    Fabio
  • acrylian Administrator, Developer
    If you use the Zenphoto albumzip function the zip file is created on and by the server. Since albums can and therefore their zip files can be quite big your server needs to be able to handle that. Yours apparently is not (For really big once most will probably not).

    Or try the 1.4.3 beta which has the albumzipstream incorporated (within the downloadlist plugin) which should be less memory consuming at least.
  • fava64 Member
    I have know uploaded a zip-file to the album-directory (created at home). Its size is about 230MB. Now, when I click on the download link, a zip-File is downloaded, it opens the download-dialog and indicates a file-size of 87MB. When I download the file, its size is in fact only 87MB and nothing is shown when I decompress it. Then, I have uploaded and activated the albumZipStream plugin (a new folder in /plugin, and the main-file directly in the plugin-folder) and changed the function in the album.php to printAlbumZipStream() (I use the default theme). Nothing changed.
    Fabio
  • acrylian Administrator, Developer
    If you uploaded a manually created zip file and then use the albumzip function to download it, it will not be used as the function is normally generating it (unless you use the persistent archive option). You will need a direct link.

    Albumzipstream will also not work as that generates the zip archive on the fly so not using your manually created one either.
Sign In or Register to comment.