When trying to create a zipfile with
http://localhost/zenphoto/zp-core/album-zip.php?album=011140
I get a 500 status: Internal Server Error
What's more.. when I point to a non existing album like
?album=foobar I get a 200 status and not the 404 like I should from createAlbumZip()
500 errors are almost always related to server configurations. In the case of a direct link as you have tried above it is most likely caused by the file permissions of the script or the folder not allowing execution.
You should check the permissions on the specific script file. Also report back on any warnings that setup gave when you installed.
Still nothing.. my admin-zip.php is set to 777 and so is the zp-core folder. I am writing cached images just fine.
Setup Log:[i] Zenphoto Setup v1.4.1.1[7644] Fri, 08 Jul 2011 11:10:10 +0200
Completed system check
Migrating lib-auth data version => version 3
Notice: "Module mod_rewrite" is working. The Zenphoto option "mod_rewrite" will be set to "enabled".[/i]
I have no clue what's going on.
Also why no 404 with non existing album name??
Actually, I see why it doesn't do that accessing the direct link.. because the Gallery class is not imported, right?
Ok on the downloadList.php docs:
http://www.zenphoto.org/documentation/plugins/_zp-extensions---downloadList.php.html
Quote:void printDownloadLinkAlbumZip( [ $linktext = ''], [ $albumobj = ''] )
$albumobj??
In my album.php template file I do:
`
`
Of course both function calls as you used them do not show anything. Please read this to learn some PHP basics of how to set parameters:
http://www.zenphoto.org/news/how-to-read-the-zenphoto-functions-guide
Btw, to save you some work, just use:
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functionprintAlbumZip.
The downloadlist plugin is not required for this and just provides an download count and a "masked" download link.
Hi acrylian, it's just that the param type is not specified in the documentation, that's why I tried with printDownloadLinkAlbumZip($_zp_current_album); but actually I forgot the first param, doh
printDownloadLinkAlbumZip('test download', $_zp_current_album); prints the link and stats as wel as printAlbumZip()
But clicking on the link results in a blank http://localhost/zenphoto/zp-core/album-zip.php?album=011140
No zip is created in any of the folders??
I am not familiar how the zip libary - an adaption actually - works. Maybe it is somehow dependent on the PHP zip module being installed and that is missing.
I could not find anything on the file documentation at first glance though. It is a little old already (2009) in computer terms as well...
I did some quick research, our 2.8.2 version from 2009 of the pclzip libary is indeed the latest. However, on the FAQ I found only this entry:
Quote:Q1 : While creating an archive with PclZip, the script terminates with an empty created zip archive, why ?
The behavior was encounter while the zlib extension is not enabled with the PHP installation. PclZip uses the compression functions from the zlib. In next releases of PclZip (1.1+) a systematic control of the zlib presence will be done.
http://www.phpconcept.net/pclzip/faq
So it seems not to require the zip or zlib PHP module specifially, at least no real dependency is noted anywhere...
Thanks sbillard!
Indeed it works in the latest nightly.
I thought that v1.4.1.1 was updated with the latest fixes, but quite a few differences.
Anyway, with the "enable persistent archives" option checked and using printAlbumZip(); I can't find the zipfile anywhere though. Where should the zip be written?