Just thought I should post the errors I’m getting to the page when testing this :
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/images/uploads/1.jpg) is not within the allowed path(s): (/usr/local/psa/home/vhosts/****.co.uk/httpdocs:/tmp) in /usr/local/psa/home/vhosts/****.co.uk/httpdocs/admin/plugins/pi.zip.php on line 62 Warning: fopen() [function.fopen]: open_basedir restriction in effect. File(/test.zip) is not within the allowed path(s): (/usr/local/psa/home/vhosts/****.co.uk/httpdocs:/tmp) in /usr/local/psa/home/vhosts/****.co.uk/httpdocs/admin/plugins/pi.zip.php on line 362 Warning: fopen(/test.zip) [function.fopen]: failed to open stream: Operation not permitted in /usr/local/psa/home/vhosts/****.co.uk/httpdocs/admin/plugins/pi.zip.php on line 362 Warning: fwrite(): supplied argument is not a valid stream resource in /usr/local/psa/home/vhosts/****.co.uk/httpdocs/admin/plugins/pi.zip.php on line 363 Warning: fclose(): supplied argument is not a valid stream resource in /usr/local/psa/home/vhosts/****.co.uk/httpdocs/admin/plugins/pi.zip.php on line 364
I tried setting the code like this :
{exp:zip direct_output="true" folder="" filename="test.zip" max_size="50"}
{zip:files}/images/uploads/1.jpg{/zip:files}
{if file_limit}File Limit!{/if}
{/exp:zip}Not really too sure where I’m going wrong on this though? Any thoughts?
Best wishes,
Mark
MX Zip version 0.7 release
2Mark Bowen Try the new version – I fount the bug with direct_output setting in old one (but the paramets is change, so pls. look on new example).
Hi,
I cant seem to get it to output anything. I’ve got the following code:
{exp:zip direct_output="no"}
{zip:files}
{image_matrix backspace="1"}[/var/www/absolute_path{src}]
{/image_matrix}
{/zip:files}
{/exp:zip}{image_matrix backspace="1"}[/var/www/absolute_path{src}]
{/image_matrix}outputs the following: (the paths to the files are correct)
[/var/www/absolute_path/media/images/fotoviewer.jpg][/var/www/absolute_path/media/images/fotoviewer.jpg][/var/www/absolute_path/media/images/fotoviewer.jpg][/var/www/absolute_path/media/images/fotoviewer.jpg]The template doesn’t return anything, and doesn’t give me any errors and template debugging doesn’t trow any errors as well.
Hi,
I don’t know if your aware but your files can’t be opened with the default Mac OS X achive utility, but can be opened by a thirdparty utility.
If currently have the following template:
{exp:weblog:entries status="Open|Verborgen" require_entry="yes" disable="categories|category_fields|member_data|pagination|trackbacks"}
<h2>{title}</h2>
{exp:zip direct_output="no" folder="/var/www/vhosts/new.verdel.it/subdomains/kindkracht/httpdocs/media/files/" root_level="8" filename="{url_title}{edit_date}.zip"}
{zip:files}
{afbeeldingen_matrix backspace="1"}[/var/www/vhosts/new.verdel.it/subdomains/kindkracht/httpdocs{src}]{/afbeeldingen_matrix}
{/zip:files}
{/exp:zip}
<a href="/media/files/{url_title}{edit_date}.zip">Download afbeeldingen als <code>.zipThis works as expected, one question though, does it cache the .zip files? If it is created once, does it recreate the file every time the template runs or does it check for the file first?
I don’t know if your aware but your files can’t be opened with the default Mac OS X achive utility, but can be opened by a thirdparty utility.
:( I will check it soon.
Hi, This works as expected, one question though, does it cache the .zip files? If it is created once, does it recreate the file every time the template runs or does it check for the file first?
Not yet. Zip created, pushed to user and deleted. But I will add cache to my future list.
I’ve changed the functionality of the plugin a bit so that the plugin checks if a file exists, this in combination with the {url}{edit_date} filename creates the caching system that is suited for my purpose.
I’ve checked it to work with the folowing code:
{exp:zip check_exists="yes" direct_output="no" folder="/absolute_path/media/files" root_level="8" filename="{url_title}{edit_date}.zip"}note that i’ve added the check_exists parameter.
Hi,
I’m having issues with this plugin. When set to direct output = no it saves the zip file correctly but it’s empty.
When I set direct = yes I get a fatal error “Call to undefined function mime_header_encode() in pi.zip.php on line 151”
Are there any dependencies I could be missing?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.